JasonMillward / Autorippr

Rip discs automatically using a blend of Python, MakeMKV and HandBrake
MIT License
245 stars 60 forks source link

ImportError: No module named 'logger' #103

Closed raidermax closed 8 years ago

raidermax commented 9 years ago

I installed all the prerequisites following the docs for my Arch Linux install and when I get to python autorippr.py --test I get this message

Traceback (most recent call last): File "autorippr.py", line 57, in from classes import * File "/home/bob/autoripper/Autorippr/classes/compression.py", line 15, in import logger ImportError: No module named 'logger'

EDIT: I did "sudo pip install logger" and now when I run the python autorippr.py --test thingy I get "No module named 'handbrake' instead of logger. There does not appear to be a python module handbrake.

carrigan98 commented 9 years ago

Are you running Python version 2.7?

JasonMillward commented 9 years ago

Hey @raidermax, when you raised this issue you would have seen a link to the "guidelines for contributing to this repository" which would take you here: https://github.com/JasonMillward/Autorippr/blob/master/CONTRIBUTING.md#raising-an-issue

Can you please fill in your report with some more information to help me solve the problem?

raidermax commented 9 years ago

@JasonMillward I did not see that link at all anywhere, my apologizes. And yes I can provide you with more info

General computer info Arch Linux kernel 4.2.5 Arch Linux 4.2.5 Intel core i5 2400, AMD 7950 using radeonsi/mesa

Python Okay so apparently I have a package called python which is versioned 2.7.10 and I have another package installed called "python" which is versioned 3.5.0

Autorippr Version 1.6.3

Issue Please see OP for issue

autoripper with --debug

Traceback (most recent call last): File "autorippr.py", line 57, in from classes import * File "/home/blah/autoripper/Autorippr/classes/compression.py", line 16, in import handbrake ImportError: No module named 'handbrake'

JasonMillward commented 9 years ago

I'm confused as to why that is happening, python should be loading the handbrake module from the classes directory.

init.py from 1.6.3 includes compression, handbrake and logger.

I'm going to spin up an Arch VM to see what's going on, while I do that can you paste in the output of a tree just incase some files went missing (somehow), and just confirm that the python version you run is actually 2.7.10 with python --version since you can have multiple versions installed?

Should return something like this;

.
├── autorippr.log
├── autorippr.py
├── autorippr.sqlite
├── classes
│   ├── analytics.py
│   ├── compression.py
│   ├── database.py
│   ├── docopt.py
│   ├── ffmpeg.py
│   ├── filebot.py
│   ├── handbrake.py
│   ├── __init__.py
│   ├── logger.py
│   ├── makemkv.py
│   ├── notification.py
│   ├── pushover.py
│   ├── smtp.py
│   ├── stopwatch.py
│   └── testing.py
├── CONTRIBUTING.md
├── LICENSE
├── NOTES.md
├── README.md
├── settings.cfg
└── settings.example.cfg
raidermax commented 9 years ago

Apparently doing python --version is showing I am running 3.5.0 and not 2.7....so maybe that is why? I think Arch Linux requires python-3.5.0 for some core stuff. I could always try doing pacman -Rdd to remove python-3.5.0 without removing dependencies if I want to use autorippr right?, hopefully that wont break anything. Here is the tree btw

Autorippr/ ├── autorippr.py ├── classes │   ├── analytics.py │   ├── compression.py │   ├── database.py │   ├── docopt.py │   ├── ffmpeg.py │   ├── filebot.py │   ├── handbrake.py │   ├── init.py │   ├── logger.py │   ├── makemkv.py │   ├── pycache │   │   ├── analytics.cpython-35.pyc │   │   ├── compression.cpython-35.pyc │   │   └── init.cpython-35.pyc │   ├── stopwatch.py │   └── testing.py ├── CONTRIBUTING.md ├── LICENSE ├── NOTES.md ├── README.md ├── settings.cfg └── settings.example.cfg

(Side question, I used MakeMKV standalone today, noticed Autorippr uses MakeMKV also....does this bypass needing to use a license or is there a trial also?)

JasonMillward commented 9 years ago

Apparently doing python --version is showing I am running 3.5.0 and not 2.7....so maybe that is why?

You should be able to change which version you use just by adding 2 or 3 to python, eg; python2 autorippr.py

Give that a try just incase it is a python 3 issue.

(Side question, I used MakeMKV standalone today, noticed Autorippr uses MakeMKV also....does this bypass needing to use a license or is there a trial also?)

No it doesn't bypass needing a licence, if you're not aware MakeMKV is free while in beta.

JasonMillward commented 9 years ago

Well, I think I can confirm it to be a python3 issue.

freyr :: ~/scripts/Autorippr ‹issue-102› % python3 autorippr.py --rip --debug
Traceback (most recent call last):
  File "autorippr.py", line 58, in <module>
    from classes import *
  File "/home/jason/scripts/Autorippr/classes/compression.py", line 15, in <module>
    import logger
ImportError: No module named 'logger'