Message352985
Below is a minimum reproducible test case of what appears to be an issue in pickle.
Before pickling the exception ClientConnectionError, from aiohttp, the property ClientConnectionError._os_error is a PermissionError object (a subclass of OSError). After deserialization ClientConnectionError._os_error appears to be a string based on the exception that is produced.
I'm not familiar enough with pickle to make much headway here.
```
import aiohttp
import pickle
connection_key = aiohttp.client_reqrep.ConnectionKey
ose = OSError(1, 'unittest')
cce = aiohttp.client_exceptions.ClientConnectorError(connection_key, ose)
cce_pickled = pickle.dumps(cce)
pickle.loads(cce_pickled)
```
```
Traceback (most recent call last):
File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1758, in <module>
main()
File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1752, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1147, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/opt/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/project_neural_mouse/src/ARCHIVE/scratch/scratch_13.py", line 11, in <module>
File "/usr/local/lib/python3.6/dist-packages/aiohttp/client_exceptions.py", line 133, in __init__
super().__init__(os_error.errno, os_error.strerror)
AttributeError: 'str' object has no attribute 'errno'
``` |
|
Date |
User |
Action |
Args |
2019-09-22 18:02:44 | davidparks21 | set | recipients:
+ davidparks21 |
2019-09-22 18:02:44 | davidparks21 | set | messageid: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> |
2019-09-22 18:02:44 | davidparks21 | link | issue38254 messages |
2019-09-22 18:02:43 | davidparks21 | create | |
|