Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QGIS 3.34 Python Error
#1
Hi.
I installed OSGeo4S and QGIS 3.34. When I open QGIS I have this error:

Python Error: Failed to load plugin 'crayfish' due to error calling classFactory() method. See the message log (Python Error) for more details.

Error:
2023-11-10T20:37:51 CRITICAL Traceback (most recent call last): File "C:\Users/utente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\crayfish\gui\plot_widget.py", line 38, in import pyqtgraph File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'pyqtgraph' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:\Users/utente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\crayfish\__init__.py", line 29, in classFactory from .plugin import CrayfishPlugin File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/utente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\crayfish\plugin.py", line 31, in from .gui.plot_widget import CrayfishPlotWidget File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/utente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\crayfish\gui\plot_widget.py", line 45, in import pyqtgraph File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 664, in _load_unlocked File "", line 627, in _load_backward_compatible File "", line 259, in load_module File "C:\Users\utente\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\crayfish\gui\..\pyqtgraph-0.10.0-py2.py3-none-any.whl\pyqtgraph\__init__.py", line 204, in from .graphicsItems.VTickGroup import * File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 664, in _load_unlocked File "", line 627, in _load_backward_compatible File "", line 259, in load_module File "C:\Users\utente\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\crayfish\gui\..\pyqtgraph-0.10.0-py2.py3-none-any.whl\pyqtgraph\graphicsItems\VTickGroup.py", line 7, in from .. import functions as fn File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 664, in _load_unlocked File "", line 627, in _load_backward_compatible File "", line 259, in load_module File "C:\Users\utente\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\crayfish\gui\..\pyqtgraph-0.10.0-py2.py3-none-any.whl\pyqtgraph\functions.py", line 17, in from . import debug File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 664, in _load_unlocked File "", line 627, in _load_backward_compatible File "", line 259, in load_module File "C:\Users\utente\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\crayfish\gui\..\pyqtgraph-0.10.0-py2.py3-none-any.whl\pyqtgraph\debug.py", line 11, in from . import ptime File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 664, in _load_unlocked File "", line 627, in _load_backward_compatible File "", line 259, in load_module File "C:\Users\utente\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\crayfish\gui\..\pyqtgraph-0.10.0-py2.py3-none-any.whl\pyqtgraph\ptime.py", line 24, in cstart = systime.clock() ### Required to start the clock in windows AttributeError: module 'time' has no attribute 'clock'
How can I fix it ?
Larz60+ write Nov-13-2023, 03:43 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Modified for you this time. Please use BBCode tags on future posts.
Reply
#2
Last line shows error that caused the failure.
all of the previous lines are order of execution that preceeded the error.

Read 'time' doc.

suggest you contact author of 'crayfish' his email address can be found here in PiPi.org
Reply
#3
What version of crayfish do you use? Latest 3.6.0 (actually starting with 3.5.1) says added support for python 3.9+
time.clock() was removed in 3.8
Looking further, you definitely use version like 3.5.0 or lower
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  using python with QGIS to disseminate CSV data on a polygon wissam1974 0 1,483 Jun-10-2020, 10:13 AM
Last Post: wissam1974
  Python QGIS tool that replaces layout text labels with attributes from an input table geodenn92 1 2,693 Aug-13-2019, 06:05 AM
Last Post: buran
  Fix Memory Error while installing a library for Qgis alexastorga 0 2,591 Apr-13-2018, 04:54 PM
Last Post: alexastorga

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020