-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to save WhistleBlowerDict obj. (or an object with nested WhistleBlowerDict) to a pickle. #172
Comments
Hello @Quodzik, I have tried to reproduce your error but I've been unable to do it. This is the steps I've taken: >>> import vt
>>> a = vt.Client('a')
>>> a
<vt.client.Client object at 0x1026d29d0>
>>> import pickle
>>> b = pickle.dumps(a)
>>> b
b'\x80\x04\x95\xb8\x00\x00\x00\x00\x00\x00\x00\x8c\tvt.client\x94\x8c\x06Client\x94\x93\x94)\x81\x94}\x94(\x8c\x05_host\x94\x8c\x1ahttps://www.virustotal.com\x94\x8c\x07_apikey\x94\x8c\x01a\x94\x8c\x06_agent\x94\x8c\x07unknown\x94\x8c\x08_session\x94N\x8c\n_trust_env\x94\x89\x8c\x08_timeout\x94M,\x01\x8c\x06_proxy\x94N\x8c\r_user_headers\x94N\x8c\x0b_verify_ssl\x94\x88ub.'
>>> c = pickle.loads(b)
>>> c
<vt.client.Client object at 0x1026d35d0> Can you provide more accurate steps to reproduce the problem? Thanks. |
Hi @mgmacias95,
Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I'm saving a custom class instance to a pickle file, there's no error, file is being generated in the filesystem.
I do this with:
pickle.dump(proc_db, open('process_db_vted.pickle', 'wb'))
I have also tried changing default arguments (protocol=pickle.HIGHEST_PROTOCOL and fix_imports=True).
When trying to load the pickle file with:
proc_db = pickle.load(open('process_db_vted.pickle', 'rb'))
I get:
please advise
Regards,
Q
The text was updated successfully, but these errors were encountered: