uvNikita / librarian

Books library management application
3 stars 2 forks source link

Error parsing inpx file when path contains non-ascii symbols #15

Closed AAzza closed 10 years ago

AAzza commented 10 years ago
Traceback (most recent call last):
  File "/root/librarian/env/lib/python2.7/site-packages/celery/task/trace.py", line 233, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/root/librarian/env/lib/python2.7/site-packages/celery/task/trace.py", line 420, in __protected_call__
    return self.run(*args, **kwargs)
  File "/root/librarian/src/librarian/tasks.py", line 26, in wrapper
    return task(*args, **kwargs)
  File "/root/librarian/src/librarian/tasks.py", line 103, in add_books_from_inpx
    with ZipFile(path) as inpx_file:
  File "/usr/local/lib/python2.7/zipfile.py", line 752, in __init__
    self.fp = open(file, modeDict[mode])
None: 'ascii' codec can't encode characters in position 23-33: ordinal not in range(128)
AAzza commented 10 years ago

Fixed. One of the problems was missing encoding env variables in the supervisor.conf.