review-tools.updates-available crashes with python exception

Bug #2021942 reported by Alex Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
review-tools
Fix Committed
Undecided
Unassigned

Bug Description

$ review-tools.updates-available
Traceback (most recent call last):
  File "/snap/review-tools/3246/bin/snap-updates-available", line 45, in <module>
    import reviewtools.available as available
  File "/snap/review-tools/3246/lib/python3.8/site-packages/reviewtools/available.py", line 21, in <module>
    from reviewtools.common import (
  File "/snap/review-tools/3246/lib/python3.8/site-packages/reviewtools/common.py", line 26, in <module>
    import magic
ModuleNotFoundError: No module named 'magic'

We may need to set PYTHONPATH directly since this package is already staged (python3-magic)

ProblemType: Bug
DistroRelease: Ubuntu 23.04
ProcVersionSignature: Ubuntu 6.2.0-20.20-generic 6.2.6
Uname: Linux 6.2.0-20-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed May 31 16:02:23 2023
InstallationDate: Installed on 2021-08-03 (666 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Alpha amd64 (20210802)
Snap: review-tools 0.48+20230530-0510UTC-2-g0c9ab (latest/edge)
SnapChanges:
 ID Status Spawn Ready Summary
 2711 Done 2023-05-30T20:37:14+09:30 2023-05-30T20:37:28+09:30 Auto-refresh snap "review-tools"
 2717 Done 2023-05-31T14:45:07+09:30 2023-05-31T14:46:52+09:30 Auto-refresh snap "review-tools"
SnapConnections:
 Interface Plug Slot Notes
 home review-tools:home :home manual
 mount-observe review-tools:mount-observe - -
 network review-tools:network :network -
SnapSource: review-tools
UpgradeStatus: Upgraded to lunar on 2023-01-27 (123 days ago)

Related branches

Revision history for this message
Alex Murray (alexmurray) wrote :
Revision history for this message
Alex Murray (alexmurray) wrote :

Manually specifying PYTHONPATH to point within the snap appears to get it working:

$ PYTHONPATH=/snap/review-tools/current/usr/lib/python3/dist-packages/ review-tools.updates-available
ERROR: Must specify --snap or --store-db

Alex Murray (alexmurray)
Changed in review-tools:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.