Sent Surveys via PC. Where are they stored?

1599
9
10-24-2017 12:07 PM
Chris_Anderson
Occasional Contributor II

I have folks entering data using SURVEY 123. I have someone in the field that collected data using an older form (on a PC) with a different schema. Is there any way to recover the data from the PC and bring it into the new schema (through other steps)? Where is this old data stored?

Any help you can provide is greatly appreciated.

Chris Anderson

Fish and Wildlife Conservation Commission

Tags (2)
0 Kudos
9 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

The Survey data is stored in the folder C:\Users\<username>\ArcGIS , in the "My Surveys" and "My Survey Attachments" folders.  It is possible to export the data out; this script (GitHub - tedrick/ReadS123DB: Convert the survey data stored in the Survey123 Field App into a set of... ) should be able to help you with exporting so that you can manually append using a field map afterwards.

0 Kudos
Chris_Anderson
Occasional Contributor II

A couple of questions (sorry of these are very basic):

1. In which directory do I run the script? ArcGIS? My Surveys? My coworker sent me her entire "My Surveys" directory, can I run the tool on it outside of the "My Surveys" in my Users directory?

2. Is this Python script a double-click to run, or do I need to run it in a tool?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

1. Technically, the script could be run from anywhere.  Without modifications, it is designed to be run in the 'My Surveys\Databases' directory, in which you would add a directory called 'out' to store the output.  This can be changed  by editing lines 4 & 5.

2. In theory, you could double-click it to run (assuming python is installed), though I tend to open a command-line window and run it from there.

0 Kudos
Chris_Anderson
Occasional Contributor II

Okay. I ran the script as you suggested. Getting an error - TypeError: 'NoneType' object is not iterable.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Can you provide a screenshot of the error?

0 Kudos
Chris_Anderson
Occasional Contributor II

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Okay, I've updated the script to catch the condition when there are no attachements - you can download form GitHub and rerun

0 Kudos
erica_poisson
Occasional Contributor III

Hi James Tedrick,

I'm trying to run this script to help a user recover some surveys and I'm running into the following issue when attempting to run the script -

Traceback (most recent call last):
  File "<string>", line 254, in run_nodebug
  File "C:\Users\erica.tefft\ArcGIS\My Surveys\Databases\readDb.py", line 132, in <module>
    writeCSV(surveys, outDir)
  File "C:\Users\erica.tefft\ArcGIS\My Surveys\Databases\readDb.py", line 110, in writeCSV
    writer.writerow(row)
  File "C:\Python27\ArcGIS10.7\Lib\csv.py", line 152, in writerow
    return self.writer.writerow(self._dict_to_list(rowdict))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 27: ordinal not in range(128)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Do you have any suggestions as to what might be going wrong here?

I am running this in the My Surveys\Databases folder as instructed. Instead of running through cmd, I'm running in PyScripter.

Thanks,

Erica

Erica
0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Erika,

This indicates that some of the data is uses non-English characters; this is a limitation of Python 2.x.  Try running the script with the python that comes with ArcGIS Pro (Python 3.x).

0 Kudos