EOFError: marshal data too short -- causes?

Terry Reedy tjreedy at udel.edu
Tue Dec 29 02:19:22 EST 2015


On 12/29/2015 1:50 AM, Glenn Linderman wrote:
> Here's a sanatized stack trace off my web server:
>
>    File ".../cgihelpers.py", line 10, in
>      import cgitb
>    File ".../py34/lib/python3.4/cgitb.py", line 24, in
>      import inspect
>    File ".../py34/lib/python3.4/inspect.py", line 54, in
>      from dis import COMPILER_FLAG_NAMES as _flag_names
>    File "", line 2237, in _find_and_load
>    File "", line 2226, in _find_and_load_unlocked
>    File "", line 1200, in _load_unlocked
>    File "", line 1129, in _exec
>    File "", line 1467, in exec_module
>    File "", line 1570, in get_code
>    File "", line 656, in _compile_bytecode
> EOFError: marshal data too short
>
>
> It worked this morning, and does this now.  I hadn't changed anything.

Since it crashes trying to unmarshal compiled dis bytecode, I would 
assume that the .pyc file is corrupted and remove it. Based on the 
above, it should be in
.../py34/lib/python3.4/__pycache__/dis.*.pyc
Python will then recompile dis and write a new .pyc file.

-- 
Terry Jan Reedy




More information about the Python-list mailing list