Puremagic module [OSMC / Debian]

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Puremagic module [OSMC / Debian]

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module

Post by sander »

What is the full output of

Code: Select all

 pip3 install puremagic
I see "OSMC", so is this open source media center?
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module

Post 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
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module

Post 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'
>>>
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module [OSMC / Debian]

Post 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'
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module [OSMC / Debian]

Post 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.
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module [OSMC / Debian]

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module [OSMC / Debian]

Post by sander »

Final try:

Code: Select all

sudo apt-get update
sudo apt-get install python3-puremagic
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module [OSMC / Debian]

Post by pinn »

Same issue.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module [OSMC / Debian]

Post by sander »

OK. Then I give up.
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module [OSMC / Debian]

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Puremagic module [OSMC / Debian]

Post 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
pinn
Jr. Member
Jr. Member
Posts: 85
Joined: September 18th, 2011, 4:08 am

Re: Puremagic module [OSMC / Debian]

Post 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
Post Reply