Skip to content

OSError: [Errno 9] Bad file descriptor #380

@3fon3fonov

Description

@3fon3fonov

I do not understand what is going one with this error! I am trying to load a dill dump made on
a server to my local machine.

to save the dump:

    file_ses = open("target_out.ses", "wb")
    dill.dump(fit, file_ses)
    file_ses.close()

to load back:

    file = open(str(sys.argv[2]), "rb")
    fit = dill.load(file)
    file.close()   

And the error:

XXXX@terminator:~/VVV/MCMC$ python3 make_stab_cornerplot.py -ses target_out.ses 
Traceback (most recent call last):
  File "make_stab_cornerplot.py", line 56, in <module>
    fit = dill.load(file_pi2)
  File "/usr/local/lib/python3.6/dist-packages/dill/_dill.py", line 270, in load
    return Unpickler(file, ignore=ignore, **kwds).load()
  File "/usr/local/lib/python3.6/dist-packages/dill/_dill.py", line 473, in load
    obj = StockUnpickler.load(self)
OSError: [Errno 9] Bad file descriptor

I do not have the problem on the server machine.

Any ideas on how to debug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions