question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError

See original GitHub issue

I’m running blender 2.80 from docker like this:

#!/bin/sh
exec \
  docker run -t \
  -e ADDON_DIRECTORIES_TO_LOAD \
  -e EDITOR_PORT \
  -e ALLOW_MODIFY_EXTERNAL_PYTHON \
  -e DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /home/radivarig/:/home/radivarig \
  --network="host" \
  --device /dev/snd \
  ubuntu/blender:version3 \
  ./home/radivarig/projects/blender-env/blender-2.80-4dd0a90f4213-linux-glibc224-x86_64/blender "$@" \

I select it as blender executable after running Blender: Start, blender does opens but throws:

File "/home/radivarig/projects/blender-env/blender-2.80-4dd0a90f4213-linux-glibc224-x86_64/2.80/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'TestAddon'

The addon symlink is created under '/root/.config/blender/2.80/scripts/addons' inside the docker container and when I reset to factory settings or open blender by hand enabling the addon does work.

Any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
jessey-gitcommented, Jan 7, 2019

It’s probably not related to docker. I’ve seen this happen as well on raw win10. For me it happened because I started with a completely blank Blender config directory and attempted to launch blender with my addon right away from vscode. To fix this I had to launch blender by itself first, and then enable my addon manually.

After that I was able to use the vscode extension normally. It seems that the extension has trouble if the addon doesn’t exist yet?

2reactions
Radivarigcommented, Aug 17, 2019

@jessey-git could you publish an update to the vscode market?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: no module named Python Error [Fixed]
How to fix the ModuleNotFoundError in Python · 1. Make sure imported modules are installed · 2. Make sure modules are spelled correctly...
Read more >
How to Fix ModuleNotFoundError and ImportError
first make sure you are using absolute imports · export the project's root directory to PYTHONPATH.
Read more >
python - 'ModuleNotFoundError' when trying to import module ...
manModules import * ModuleNotFoundError: No module named 'Soft' $ PYTHONPATH=$PYTHONPATH:/temp/man/MansTest/SoftLib $ export PYTHONPATH ...
Read more >
How To Fix ModuleNotFoundError (No Module Named) in ...
The ModuleNotFoundError: No module named error is raised when Python either cannot find the module you're trying to import, the name of the...
Read more >
How To Solve ModuleNotFoundError: No module named in ...
The first reason for ModuleNotFoundError: No module named is the module name is incorrect. For example, let's try to import the os module ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found