Q:

Can anyone help with csv2json.py errors please?

I'm trying to populate a csv file from the model level, not form..populate once and only once.
I've read in many places that poeple use csv2json and them "loaddata" and that is all
The thing is that i am getting an error that i didm't see in any other blog or tutorial.
user@server:/PATH/TO/HOST$ python csv2json.py Israel_places_full.csv accounts.City
Converting Israel_places_full.csv from CSV to JSON as Israel_places_full.csv.json
Traceback (most recent call last):
    File "csv2json.py", line 70, in <module>
    row_dict["pk"] = int(pk)
ValueError: invalid literal for int() with base 10: '\xe0\xe1\xe5 \xe2\xe5\xf9'

Can any one help me with that please?
10x.

A:

Solved the problem....working amazing :-)
EDIT: for the rest of you out there, My mistake what that there is a strict format to build the csv file when using the csv2json.py fix. you have to do: "id, all other fields", for every line.... i didn't add the id, so it didn't work.... but it is a great and very fact way to populate a big table, just get or create a csv file (very easy) and then conver it to json. The last part from there is just to "loaddata" to the model and you are set.. Good luck

