I just solved it!

I changed my download command to this

"bulkloader.py --download --config_file=bulkloader.yaml --kind=" + kind + " 
--url=http://"; + url + ".appspot.com/_ah/remote_api --filename=SQL/" + kind 
+ ".csv"

the thing is not* appcfg.py* but *bulkloader.py
*
not d*ownload_data* but* --download
*
and lastly added *--config_file=bulkloader.yaml *to the line. It worked. I 
got the help from this 
post<http://blog.notdot.net/2010/04/Using-the-new-bulkloader>
.



On Tuesday, September 3, 2013 5:44:12 PM UTC+3, Sercan Altundas wrote:
>
> I upload a *"Person.csv"* file to my GAE application via bulkloader, 
> which looks like this;
>
> Name,Age,Gender
> Sercan,22,M
> Tabitha,21,F
>
> once I upload the table, I can properly see it in datastore viewer. But 
> then when I want to download it back, again via bulkloader, file comes back 
> wit corrupt characters in it like this;
>
>
> <https://lh3.googleusercontent.com/-wxAsP6Soz44/UiXzN_z-TMI/AAAAAAAAAFw/hqdyxiFE6Ww/s1600/Ads%C4%B1z.png>
>
> cheezy eh?
>
> So first I thought application kinda encripted it, but I deleted my Person 
> entity form datastore and tried to upload the one I just download (the one 
> looks corrupted). Well, it was unable to upload back and gave me an utf-8 
> error. Here is my console output.
>
> Name of your application: banamsgbirak
> Name of the table to upload: Person
> Your gmail adress: sercan.altundas
> ()
> 05:39 PM Uploading data records.
> [INFO    ] Logging to bulkloader-log-20130903.173928
> [INFO    ] Throttling transfers:
> [INFO    ] Bandwidth: 250000 bytes/second
> [INFO    ] HTTP connections: 8/second
> [INFO    ] Entities inserted/fetched/modified: 20/second
> [INFO    ] Batch Size: 10
> [INFO    ] Opening database: bulkloader-progress-20130903.173928.sql3
> [INFO    ] Connecting to banamsgbirak.appspot.com/_ah/remote_api
> [INFO    ] Starting import; maximum 10 entities per post
> [ERROR   ] [Thread-12] DataSourceThread:
> Traceback (most recent call last):
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py", line 
> 1601, in run self.PerformWork()
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py", line 
> 1720, in PerformWork for item in content_gen.Batches():
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py", line 
> 556, in Batches self._ReadRows(key_start, key_end)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py", line 
> 466, in _ReadRows row = self.reader.next()
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\ext\bulkload\csv_connector.py",
>  
> line 218, in generate_import_record for input_dict in self.dict_generator:
>   File "C:\Python27\lib\csv.py", line 103, in next self.fieldnames
>   File "C:\Python27\lib\csv.py", line 90, in fieldnames self._fieldnames 
> = self.reader.next()
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\ext\bulkload\csv_connector.py",
>  
> line 54, in utf8_recoder for line in codecs.getreader(encoding)(stream):
>   File "C:\Python27\lib\codecs.py", line 615, in next line = 
> self.readline()
>   File "C:\Python27\lib\codecs.py", line 530, in readline data = 
> self.read(readsize, firstline=True)
>   File "C:\Python27\lib\codecs.py", line 477, in read newchars, 
> decodedbytes = self.decode(data, self.errors)
> UnicodeDecodeError: 'utf8' codec can't decode byte 0xfc in position 0: 
> invalid start byte [INFO    ] An error occurred. Shutting down...
> [ERROR   ] Error in data source thread: 'utf8' codec can't decode byte 
> 0xfc in position 0: invalid start byte
> [INFO    ] 0 entities total, 0 previously transferred
> [INFO    ] 0 entities (2590 bytes) transferred in 2.6 seconds
> [INFO    ] Some entities not successfully transferred
> Press ENTER to exit...
>
>
> I looked for appcfg.py options but could not find any about charset, so 
> now I am setting a trap to catch your ideas? What sould I do about this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to