pipelime-python icon indicating copy to clipboard operation
pipelime-python copied to clipboard

Issues with blender python api

Open LucaBonfiglioli opened this issue 2 years ago • 0 comments

  • pipelime version: 1.9.1
  • Python version: 3.10
  • Operating System: Ubuntu 22.04

Description

If bpy is imported, pipelime won't be able to run with multiprocessing.

What I Did

  1. Create a file named bug.py with the following statement
import bpy
  1. Running the following command
pipelime -m bug.py clone +i folder1 +o folder2 +g 8,1

Will result in the following error message:

  File "/home/luca/venvs/XXX/lib/python3.10/site-packages/billiard/process.py", line 323, in _bootstrap
    self.run()
  File "/home/luca/venvs/XXX/lib/python3.10/site-packages/billiard/process.py", line 110, in run
    self._target(*self._args, **self._kwargs)
  File "/home/luca/venvs/XXX/lib/python3.10/site-packages/billiard/pool.py", line 288, in __call__
    self.after_fork()
  File "/home/luca/venvs/XXX/lib/python3.10/site-packages/billiard/pool.py", line 420, in after_fork
    self.initializer(*self.initargs)
  File "/home/luca/repos/pipelime-python/pipelime/sequences/grabber.py", line 87, in wrk_init
    PipelimeSymbolsHelper.import_everything()
  File "/home/luca/repos/pipelime-python/pipelime/cli/utils.py", line 185, in import_everything
    cls.cached_modules[module_name] = pl_imports.import_module(
  File "/home/luca/repos/pipelime-python/pipelime/choixe/utils/imports.py", line 248, in import_module
    raise ImportError(
ImportError: Cannot import:
  `/home/luca/repos/XXXXXX/bug.py`
Possible causes:
  from file: No module named '_bpy'
  from classpath: No module named '/home/luca/repos/XXXXXX/bug'
  from code: invalid syntax (<string>, line 1)

LucaBonfiglioli avatar Jan 11 '24 09:01 LucaBonfiglioli