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

AttributeError: module '__main__' has no attribute '__spec__' #48

Open
alyferryhalo opened this issue Sep 5, 2022 · 0 comments
Open

Comments

@alyferryhalo
Copy link

Hello!

I tried to run the command mmpdb fragment tests/chembl_test.smi -o tests/chembl_test.fragments with my own data - looks like this (if it matters):

c1cn(-c2ccc3c(-c4cc5cc(CN6CCCCC6)ccc5[nH]4)n[nH]c3c2)nn1
CN(C)C(=O)c1ccc2c(-c3cc4cc(CN5CCOCC5)ccc4[nH]3)n[nH]c2c1
c1cnn(-c2ccc3c(-c4cc5cc(CN6CCCCC6)ccc5[nH]4)n[nH]c3c2)c1
c1cc2[nH]c(-c3n[nH]c4cc(-c5cn[nH]c5)ccc34)cc2cc1CN1CCOCC1
c1ncc(-c2cnc(Nc3cc(N4CCNCC4)ccn3)s2)cn1

and then I got AttributeError: module '__main__' has no attribute '__spec__' with the full traceback:

Traceback (most recent call last):
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/bin/mmpdb", line 4, in <module>
    __import__('pkg_resources').run_script('mmpdb==2.3.dev1', 'mmpdb')
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/pkg_resources/__init__.py", line 672, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1472, in run_script
    exec(code, namespace, namespace)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/mmpdb-2.3.dev1-py3.9.egg/EGG-INFO/scripts/mmpdb", line 11, in <module>
    commandline.main()
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/mmpdb-2.3.dev1-py3.9.egg/mmpdblib/commandline.py", line 1054, in main
    parsed_args.command(parsed_args.subparser, parsed_args)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/mmpdb-2.3.dev1-py3.9.egg/mmpdblib/commandline.py", line 181, in fragment_command
    do_fragment.fragment_command(parser, args)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/mmpdb-2.3.dev1-py3.9.egg/mmpdblib/do_fragment.py", line 567, in fragment_command
    pool = create_pool(args.num_jobs)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/site-packages/mmpdb-2.3.dev1-py3.9.egg/mmpdblib/do_fragment.py", line 396, in create_pool
    pool = multiprocessing.Pool(num_jobs, init_worker)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/pool.py", line 212, in __init__
    self._repopulate_pool()
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/pool.py", line 303, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/pool.py", line 326, in _repopulate_pool_static
    w.start()
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/alisagorislav/opt/anaconda3/envs/mmpdb/lib/python3.9/multiprocessing/spawn.py", line 183, in get_preparation_data
    main_mod_name = getattr(main_module.__spec__, "name", None)
AttributeError: module '__main__' has no attribute '__spec__'

I used macOS Monterey 12.1

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

1 participant