Opened 8 months ago

Closed 8 months ago

#68211 closed defect (fixed)

glances 3.4.0.3_0: ModuleNotFoundError: No module named 'ujson'

Reported by: brianallenlevine Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: barracuda156, RobK88
Port: glances

Description (last modified by ryandesign (Ryan Carsten Schmidt))

xxxxxx@xxxxxxx ~ % glances
Password:
Traceback (most recent call last):
  File "/opt/local/bin/glances", line 5, in <module>
    from glances import main
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/__init__.py", line 35, in <module>
    from glances.compat import PY3
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/compat.py", line 25, in <module>
    from glances.logger import logger
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/logger.py", line 20, in <module>
    from glances.globals import safe_makedirs
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/globals.py", line 16, in <module>
    import ujson
ModuleNotFoundError: No module named 'ujson'
xxxxxx@xxxxxxx ~ % 

Change History (5)

comment:1 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: barracuda156 added
Description: modified (diff)
Summary: Glances won't run after upgrade from 3.1.7_0 to 3.4.0.3_0glances 3.4.0.3_0: ModuleNotFoundError: No module named 'ujson'

comment:2 Changed 8 months ago by RobK88

The py311-defusedxml module is also missing. See below:

Cathys-iMac-2:~ grinch$ sudo port install glances
--->  Computing dependencies for glances
The following dependencies will be installed: 
 py311-future
 py311-psutil
Continue? [Y/n]: Y
--->  Fetching archive for py311-future
--->  Attempting to fetch py311-future-0.18.2_0.darwin_any.noarch.tbz2 from http://packages.macports.org/py311-future
--->  Attempting to fetch py311-future-0.18.2_0.darwin_any.noarch.tbz2.rmd160 from http://packages.macports.org/py311-future
--->  Installing py311-future @0.18.2_0
--->  Activating py311-future @0.18.2_0
--->  Cleaning py311-future
--->  Fetching archive for py311-psutil
--->  Attempting to fetch py311-psutil-5.9.5_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/py311-psutil
--->  Attempting to fetch py311-psutil-5.9.5_0.darwin_12.x86_64.tbz2.rmd160 from http://packages.macports.org/py311-psutil
--->  Installing py311-psutil @5.9.5_0
--->  Activating py311-psutil @5.9.5_0
--->  Cleaning py311-psutil
--->  Fetching archive for glances
--->  Attempting to fetch glances-3.4.0.3_0.darwin_any.noarch.tbz2 from http://packages.macports.org/glances
--->  Attempting to fetch glances-3.4.0.3_0.darwin_any.noarch.tbz2.rmd160 from http://packages.macports.org/glances
--->  Installing glances @3.4.0.3_0
--->  Activating glances @3.4.0.3_0
--->  Cleaning glances
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
Cathys-iMac-2:~ grinch$ 
Cathys-iMac-2:~ grinch$ glances
Traceback (most recent call last):
  File "/opt/local/bin/glances", line 5, in <module>
    from glances import main
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/__init__.py", line 35, in <module>
    from glances.compat import PY3
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/compat.py", line 25, in <module>
    from glances.logger import logger
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/logger.py", line 20, in <module>
    from glances.globals import safe_makedirs
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/globals.py", line 16, in <module>
    import ujson
ModuleNotFoundError: No module named 'ujson'
Cathys-iMac-2:~ grinch$ 
Cathys-iMac-2:~ grinch$ sudo port install py311-ujson
--->  Computing dependencies for py311-ujson
--->  Fetching archive for py311-ujson
--->  Attempting to fetch py311-ujson-5.8.0_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/py311-ujson
--->  Attempting to fetch py311-ujson-5.8.0_0.darwin_12.x86_64.tbz2.rmd160 from http://packages.macports.org/py311-ujson
--->  Installing py311-ujson @5.8.0_0
--->  Activating py311-ujson @5.8.0_0
--->  Cleaning py311-ujson
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
Cathys-iMac-2:~ grinch$ 
Cathys-iMac-2:~ grinch$ glances
Traceback (most recent call last):
  File "/opt/local/bin/glances", line 5, in <module>
    from glances import main
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/__init__.py", line 35, in <module>
    from glances.compat import PY3
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/glances/compat.py", line 40, in <module>
    from defusedxml.xmlrpc import monkey_patch
ModuleNotFoundError: No module named 'defusedxml'
Cathys-iMac-2:~ grinch$ 
Cathys-iMac-2:~ grinch$ sudo port install py311-defusedxml
--->  Computing dependencies for py311-defusedxml
--->  Fetching archive for py311-defusedxml
--->  Attempting to fetch py311-defusedxml-0.7.1_0.darwin_any.noarch.tbz2 from http://packages.macports.org/py311-defusedxml
--->  Attempting to fetch py311-defusedxml-0.7.1_0.darwin_any.noarch.tbz2.rmd160 from http://packages.macports.org/py311-defusedxml
--->  Installing py311-defusedxml @0.7.1_0
--->  Activating py311-defusedxml @0.7.1_0
--->  Cleaning py311-defusedxml
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
Cathys-iMac-2:~ grinch$ 
Cathys-iMac-2:~ grinch$ glances

SUCCESS!!

comment:3 Changed 8 months ago by RobK88

Cc: RobK88 added

comment:4 Changed 8 months ago by barracuda156

I will add dependencies on these.

comment:5 Changed 8 months ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed

In f76251227089a6a3bf8dcb90f913667aa2e4534d/macports-ports (master):

glances: add missing run deps

Fixes: #68211

Note: See TracTickets for help on using tickets.