[Fixed]-Error importing data on production server- locally works fine


You are using different versions of Python locally and on the server.

Locally, you are likely using Python 3, because Python 3.4 knows the errors argument for open()

open(file, mode='r', buffering=-1, encoding=None, errors=None, 
     newline=None, closefd=True, opener=None)

On the server, you probably run Python 2, because in in Python 2.7 the errors argument does not exist

open(name[, mode[, buffering]])

That’s why the error message is complaining about ‘errors’ being “invalid”.


Leave a comment