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

blender3.4 Failed to enable the 1.7.0 plug-in #3

Open
1405100494 opened this issue Mar 1, 2023 · 1 comment
Open

blender3.4 Failed to enable the 1.7.0 plug-in #3

1405100494 opened this issue Mar 1, 2023 · 1 comment

Comments

@1405100494
Copy link

Read prefs: C:\Users\D\AppData\Roaming\Blender Foundation\Blender\3.4\config\userpref.blend
libpng warning: iCCP: cHRM chunk does not match sRGB
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
STACK SIZE: 0<-
Exception in thread Thread-1:
Traceback (most recent call last):
File "G:\Blender_Program\blender-3.4\3.4\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "G:\Blender_Program\blender-3.4\3.4\python\lib\threading.py", line 953, in run
self._target(*self._args, **self.kwargs)
TypeError: 'MainThread' object is not callable
Attempting
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│Fast PBR Viewport RenderError: --- │
│No module named 'cv2' │
│--- │
│when attempting to import cv2, we're assuming that you dont have opencv-python installed and will try to install it for you!│
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting opencv-python
Downloading opencv_python-4.7.0.72-cp37-abi3-win_amd64.whl (38.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.3/38.2 MB 13.5 kB/s eta 0:46:49
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\D\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\fast_pbr_viewport_render_init
.py", line 106, in attemptToImportModuleAndInstallItIfItIfTheCorespondingPackageDoesntExist
importlib.import_module(moduleName)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'cv2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\urllib3\response.py", line 435, in _error_catcher
yield
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\urllib3\response.py", line 516, in read
data = self._fp.read(amt) if not fp_closed else b""
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py", line 90, in read
data = self.__fp.read(amt)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\http\client.py", line 465, in read
s = self.fp.read(amt)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\ssl.py", line 1274, in recv_into
return self.read(nbytes, buffer)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\ssl.py", line 1130, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\cli\base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\commands\install.py", line 369, in run requirement_set = resolver.resolve(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\resolvelib\structs.py", line 151, in bool
return bool(self._sequence)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool
return any(self)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 297, in init
super().init(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 162, in init
self.dist = self._prepare()
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 231, in _prepare
dist = self._prepare_distribution()
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\operations\prepare.py", line 438, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\operations\prepare.py", line 483, in _prepare_linked_requirement
local_file = unpack_url(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\operations\prepare.py", line 165, in unpack_url
file = get_http_url(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\operations\prepare.py", line 106, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\network\download.py", line 147, in call
for chunk in chunks:
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\cli\progress_bars.py", line 53, in _rich_progress_bar
for chunk in iterable:
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_internal\network\utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\urllib3\response.py", line 573, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\urllib3\response.py", line 509, in read
with self._error_catcher():
File "G:\Blender_Program\blender-3.4\3.4\python\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "G:\Blender_Program\blender-3.4\3.4\python\lib\site-packages\pip_vendor\urllib3\response.py", line 440, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

[notice] A new release of pip available: 22.2.2 -> 23.0.1
[notice] To update, run: G:\Blender_Program\blender-3.4\3.4\python\bin\python.exe -m pip install --upgrade pip
First attempt of importing module failed, launching a new console and attempting from there.
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
ERROR: Pipe to stdout was broken
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)

[notice] A new release of pip available: 22.2.2 -> 23.0.1
[notice] To update, run: G:\Blender_Program\blender-3.4\3.4\python\bin\python.exe -m pip install --upgrade pip
Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='gbk'>
OSError: [Errno 22] Invalid argument
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\d\appdata\roaming\python\python310\site-packages)

[notice] A new release of pip available: 22.2.2 -> 23.0.1
[notice] To update, run: G:\Blender_Program\blender-3.4\3.4\python\bin\python.exe -m pip install --upgrade pip
Fast Pkg install > Output from pip install console

->
Requirement already satisfied: opencv-python in c:\users\d\appdata\roaming\python\python310\site-packages (4.5.5.64)
Requirement already satisfied: numpy>=1.19.3 in g:\blender_program\blender-3.4\3.4\python\lib\site-packages (from opencv-python) (1.22.0)

<-

Traceback (most recent call last):
File "G:\Blender_Program\blender-3.4\3.4\scripts\modules\addon_utils.py", line 333, in enable
mod = import(module_name)
File "C:\Users\D\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\fast_pbr_viewport_render_init_.py", line 129, in
import cv2
ModuleNotFoundError: No module named 'cv2'

@ItsCubeTime
Copy link
Owner

ItsCubeTime commented Apr 9, 2023

Not sure what the cause of this one is. Works fine on my end. If you want you could try opening up the python console in Blender and run

import sys
import os

os.system(f"{sys.executable} -m pip install opencv-python")

wait for it to finish & then try activating the addon again. This shouldnt be necessary though because my addon does something similar on its own to prevent this error from happening. Make sure you have an internet connection available as were installing open-cv via pythons package manager (over the internet)

Theres a similar issue however where it will complain about "ModuleNotFoundError: No module named 'fast'" in 1.7.0, for this one you simply have to activate the addon a second time. I intend to patch this in the future because having to activate it twice isnt a very nice workaround 😅This one is causd by me trying to modify sys.path - and it seems the changes doesnt take effect immediately for some reason (so I will need to figure out a different solution, or somehow have the addon restart itself upon activation after having modified sys.path ).

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