EOFException when uploading document

Petter Reinholdtsen pere at hungry.com
Tue Aug 24 13:02:24 CEST 2021


[Gareth Western]
> Aha,  I think I’ve narrowed the problem down to something less
> “magical” than hostname issues. It’s related to how the import script
> opens files when it sends the POST to upload a doc:
>
> with open(filepath) as content:
>
> should be:
>
> with open(filepath, ‘rb’) as content:

Ah, nice.

> This is probably a python2 -> 3 legacy thing?

Partly, but it is more a bug that was hidden with python 2 and exposed
with python 3.  Please submit a tested patch, and I'll merge into
master.

Fixed something similar with import-email, I believe, but have not run
into the problem with import-uttrekk.

-- 
Happy hacking
Petter Reinholdtsen


More information about the nikita-noark mailing list