Page 1 of 2

Puremagic module [OSMC / Debian]

Posted: July 20th, 2021, 8:46 am
by pinn
Hi ,

Updated to latest dev release from git : 3.4.0. beta 1 and had the following error:

Code: Select all

  File "/home/osmc/sabnzbd/sabnzbd/utils/file_extension.py", line 8, in <module>
    import puremagic
ModuleNotFoundError: No module named 'puremagic'
I installed this with

Code: Select all

 pip3 install puremagic
But the module is still not found. ANy help would be appreciated.

Ta

Re: Puremagic module

Posted: July 20th, 2021, 9:45 am
by sander
What is the full output of

Code: Select all

 pip3 install puremagic
I see "OSMC", so is this open source media center?

Re: Puremagic module

Posted: July 20th, 2021, 11:14 am
by pinn
OSMC , yep, as you say.

Code: Select all

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: puremagic in ./.local/lib/python3.8/site-packages                                                                                         (1.10)
Collecting argparse
  Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Installing collected packages: argparse
Successfully installed argparse-1.4.0
Rolled back to 3.3.0 and all working okay

Re: Puremagic module

Posted: July 20th, 2021, 3:02 pm
by sander
Did you see:

Code: Select all

Requirement already satisfied: puremagic in ./.local/lib/python3.8/site-packages                 
So ... I would say puremagic is already installed. Do you agree?

As the same user, start python3, and in python3 type:

Code: Select all

import puremagic
Post the full interaction with python3

Re: Puremagic module

Posted: July 21st, 2021, 1:27 am
by pinn
Agreed. I did install python 2 version also for good measure.

Do you mean post the full error message when starting up sab on 3.4.0?

Re: Puremagic module

Posted: July 21st, 2021, 1:48 am
by sander
No, like this:

Code: Select all

sander@brixit:~$ python3
Python 3.8.10 (default, Jun  2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import puremagic

>>> puremagic.__file__
'/usr/local/lib/python3.8/dist-packages/puremagic-1.10-py3.8.egg/puremagic/__init__.py'

>>> puremagic.__version__
'1.10'
>>>

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 2:12 am
by pinn

Code: Select all

osmc@HTPC:~$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import puremagic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'puremagic'

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 2:24 am
by sander
Aha. Next try:

Code: Select all

sudo apt-get install python3-puremagic
Post full output.

Then run the python3 "import puremagic" again, and post full output.

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 2:41 am
by pinn

Code: Select all

osmc@HTPC:~$ sudo apt-get install python3-puremagic
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-puremagic

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 2:54 am
by sander
Final try:

Code: Select all

sudo apt-get update
sudo apt-get install python3-puremagic

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 3:09 am
by pinn
Same issue.

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 3:19 am
by sander
OK. Then I give up.

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 3:30 am
by pinn
:) I'll ask on osmc forums and post back if it gets sorted

What's the new module for as a matter of interest?

Re: Puremagic module [OSMC / Debian]

Posted: July 21st, 2021, 3:43 am
by sander
pinn wrote: July 21st, 2021, 3:30 am What's the new module for as a matter of interest?
It finds the correct extension of very obfuscated posts. For example:

a downloaded file is called 8a0d9sf809a8d09f809ad8f0ads8f
SAB with puremagic can then add the correct extension 8a0d9sf809a8d09f809ad8f0ads8f.mkv

Re: Puremagic module [OSMC / Debian]

Posted: July 22nd, 2021, 6:15 am
by pinn
This got the module to install, Sander. Will try 3.4.0 again

Code: Select all

osmc@HTPC:~$ python3 -m pip install puremagic
Collecting puremagic
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/d5/6e/62d1cef9a0d8edf2d9c44b0a1b91b0b29b66fb693c94af278a0c76ddfd8c/puremagic-1.10-py3-none-any.whl
Collecting argparse (from puremagic)
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Installing collected packages: argparse, puremagic
Successfully installed argparse-1.4.0 puremagic-1.10
osmc@HTPC:~$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import puremagic