game-extraction-toolbox icon indicating copy to clipboard operation
game-extraction-toolbox copied to clipboard

ModuleNotFoundError: No module named 'magic' (Fedora/Linux)

Open Azyrion opened this issue 1 year ago • 14 comments

Hello I have an issue where I get this anytime I try to use any command(linux):

raceback (most recent call last):
  File "/home/jo/.local/bin/gextoolbox", line 5, in <module>
    from gex.toolbox import cli
  File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/toolbox.py", line 5, in <module>
    from gex.commands.archive.archive import archive
  File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/commands/archive/archive.py", line 3, in <module>
    from .arc.arc import arc
  File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/commands/archive/arc/arc.py", line 3, in <module>
    from .extract import extract
  File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/commands/archive/arc/extract.py", line 6, in <module>
    from gex.lib.file import identify
  File "/home/jo/.local/share/pipx/venvs/game-extraction-toolbox/lib64/python3.12/site-packages/gex/lib/file/identify.py", line 4, in <module>
    import magic
ModuleNotFoundError: No module named 'magic'

even though python3-magic is installed! Can someone help me pls?

Azyrion avatar Apr 26 '24 01:04 Azyrion

tried it with python 3.11 too after seeing that I had 3.12 installed but got the same result: game-extraction-toolbox magic error

Azyrion avatar Apr 26 '24 19:04 Azyrion

getting the same on opensuse tumbleweed.

3vilg3nius avatar May 29 '24 12:05 3vilg3nius

I'm getting this too (running in ubuntu under WSL)

jfhc avatar Jul 04 '24 20:07 jfhc

Can confirm that I'm getting this error on Arch with Python 3.12.4.

naviabbot avatar Jul 11 '24 01:07 naviabbot

Same issue on Pop!_OS 22.04 LTS with Python 3.10.12

gcspino avatar Jul 18 '24 01:07 gcspino

When I get a chance, I may see about just dropping the file identification entirely. It's a nice idea, but portable libmagic is just a pain in the butt.

On Wed, Jul 17, 2024 at 9:31 PM gcspino @.***> wrote:

Same issue on Pop!_OS 22.04 LTS with Python 3.10.12

— Reply to this email directly, view it on GitHub https://github.com/shawngmc/game-extraction-toolbox/issues/77#issuecomment-2235053963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYAQQ6PBZ7UN3BXHIPNOELZM4LGRAVCNFSM6AAAAABKMDHZG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZVGA2TGOJWGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Shawn McNaughton Application Developer, NextPoint Group http://www.nextpointgroup.com/ @.*** @.***>

shawngmc avatar Jul 29 '24 18:07 shawngmc

Has anyone managed to figure this out? I'm getting the same error on EndeavourOS. Tried Python 3.11 and 3.12, same issue on both. Even tried to run everything in a manual venv without luck.

FlitPix avatar Sep 26 '24 12:09 FlitPix

Has anyone managed to figure this out? I'm getting the same error on EndeavourOS. Tried Python 3.11 and 3.12, same issue on both. Even tried to run everything in a manual venv without luck.

My workaround was to use Windows.

gcspino avatar Sep 26 '24 12:09 gcspino

Has anyone managed to figure this out? I'm getting the same error on EndeavourOS. Tried Python 3.11 and 3.12, same issue on both. Even tried to run everything in a manual venv without luck.

My workaround was to use Windows.

That's a solution I gotta say, but it's not solution to the actual problem

Hold on a sec, @shawngmc the magic that you use is python3 not 2 right? Just to make sure

bps86 avatar Sep 28 '24 01:09 bps86

It seems like the symlink of python doesn't detect magic but the real python does, I'm going to investigate

bps86 avatar Sep 28 '24 02:09 bps86

09-28-24_10:27:36 09-28-24_10:29:44

Found a solution @shawngmc , please enable system site package on linux venv.

To fix this, edit pyvenv.cfg file on ~/.local/pipx/venvs/game-extraction-toolbox/pyvenv.cfg and set include-system-site-packages to true.

bps86 avatar Sep 28 '24 03:09 bps86