Skip to content
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

mac m2 安装Can't pickle <class 'sqlalchemy.orm.session.Session'>: it's not the same object as sqlalchemy.orm.session.Session #112

Open
hailiang-bai opened this issue Dec 4, 2023 · 2 comments

Comments

@hailiang-bai
Copy link

hailiang-bai commented Dec 4, 2023

python 3.8.13 和python3.11 都报相同的错

@hailiang-bai
Copy link
Author

Traceback (most recent call last):
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/site-packages/datafaker/cli.py", line 91, in main
db.do_fake()
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/site-packages/datafaker/utils.py", line 72, in wrapper
ret = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/site-packages/datafaker/dbs/basedb.py", line 99, in do_fake
producer.start()
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/context.py", line 288, in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Users/mrbai/opt/software/anaconda3/lib/python3.11/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'sqlalchemy.orm.session.Session'>: it's not the same object as sqlalchemy.orm.session.Session

Can't pickle <class 'sqlalchemy.orm.session.Session'>: it's not the same object as sqlalchemy.orm.session.Session

@labilixin
Copy link

我这边使用docker创建一个python环境可以运行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants