Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 support? #347

Closed
geekteq opened this issue Jun 26, 2020 · 11 comments · Fixed by #366
Closed

Ubuntu 20.04 support? #347

geekteq opened this issue Jun 26, 2020 · 11 comments · Fixed by #366
Labels
bug Contains a bug or code error Fixed Issue has been resolved

Comments

@geekteq
Copy link

geekteq commented Jun 26, 2020

Description

Automatic Ripping Machine not working under Ubuntu 20.04

Environment

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
2.1_dev

Log file

No detection whatsoever is happening so no log files are being generated.
I'm not, obviously, demanding anything - just asking if someone is working on it as I'm right now doing the rips manually since they don't get detected.

@geekteq geekteq changed the title Ubuntu 20.04 suppor? Ubuntu 20.04 support? Jun 26, 2020
@nxfifteen
Copy link

Do it work if you start ARM directly, rather than waiting for it to detect a new disc?

@geekteq
Copy link
Author

geekteq commented Jul 9, 2020

I've run them manually but it doesn't get picked up from there either - had to resort to manually running MakeMKV from UI. It doesn't even fail in logs - it does absolutely nothing.

@nxfifteen
Copy link

Do you get any output when you run this command from the commandline?

/usr/bin/python3 /opt/arm/arm/main.py -d sr1

/dev/sr1 is the name of my DVD drive

@j4nr6n
Copy link

j4nr6n commented Jul 12, 2020

I'm experiencing the same issue. Put a DVD in, nothing happens.
/usr/bin/python3 /opt/arm/arm/main.py -d sr0

/opt/arm/arm/config.py:30: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  cfg = yaml.load(f)
Traceback (most recent call last):
  File "/opt/arm/arm/main.py", line 19, in <module>
    from getkeys import grabkeys
  File "/opt/arm/arm/getkeys.py", line 2, in <module>
    from robobrowser import RoboBrowser
  File "/usr/local/lib/python3.8/dist-packages/robobrowser/__init__.py", line 3, in <module>
    from .browser import RoboBrowser
  File "/usr/local/lib/python3.8/dist-packages/robobrowser/browser.py", line 8, in <module>
    from werkzeug import cached_property
ImportError: cannot import name 'cached_property' from 'werkzeug' (/usr/local/lib/python3.8/dist-packages/werkzeug/__init__.py)

@j4nr6n
Copy link

j4nr6n commented Jul 13, 2020

Almost the same thing happens on 18.04 as well.

Traceback (most recent call last):
  File "/opt/arm/arm/main.py", line 20, in <module>
    from getkeys import grabkeys
  File "/opt/arm/arm/getkeys.py", line 2, in <module>
    from robobrowser import RoboBrowser
  File "/usr/local/lib/python3.6/dist-packages/robobrowser/__init__.py", line 3, in <module>
    from .browser import RoboBrowser
  File "/usr/local/lib/python3.6/dist-packages/robobrowser/browser.py", line 8, in <module>
    from werkzeug import cached_property
ImportError: cannot import name 'cached_property'

@j4nr6n
Copy link

j4nr6n commented Jul 13, 2020

Seems to be an issue with RoboBrowser

The command runs after running pip3 install Werkzeug==0.16.1. Hopefully RoboBrowser will eventually get around to fixing the issue on their end.

@sundios
Copy link

sundios commented Jul 17, 2020

I think Robobrowser is not maintained anymore. :/

To fix the Robobrowser issue you can edit the browser.py on /usr/local/lib/python3.6/dist-packages/robobrowser/browser.py and change the way the werkzeug is imported from werkzeug import cached_property to from werkzeug.utils import cached_property.

I was having an issue with a different tool. Maybe this will fix the issue for you as well

@j4nr6n
Copy link

j4nr6n commented Jul 17, 2020

edit the browser.py on /usr/local/lib/python3.6/dist-packages/robobrowser/browser.py

I wouldn't edit files that could be changed by an update. You can use pip3 install Werkzeug==0.16.1 to downgrade Werkzeug.

A work-around can also be implemented in ARM, here.

import werkzeug
werkzeug.cached_property = werkzeug.utils.cached_property

from robobrowser import robobrowser

@actionpotato
Copy link

@j2nr6n

This completely fixed my issue. This should probably become part of 2.1 IMO.

@joeskeen
Copy link
Contributor

The code change/workaround for running ARM manually also worked for me; however I don't think anyone ever addressed the issue of it not detecting the event and triggering it automatically when putting another disc in. I did a little digging and this is what I have learned so far:

I don't think that Ubuntu 20.04's udev works with symlinked rules files. I came to this conclusion by doing the following:

  • run udevadm monitor --property --udev then insert the disc, then CTRL+C to stop monitoring
  • run udevadm test --action="change" /devices/pci0000:00/0000:00:14.0/usb4/4-3/4-3:1.0/host6/target6:0:0/6:0:0:0/block/sr1 (your device path will likely be different, see output from previous command for proper path)
  • notice that the output for this command reads several rules files, but not the symlinked 51-automedia.rules (from the instructions in the Readme)...
  • so then try replacing the symlink with the real deal:
    rm /usr/lib/udev/rules.d/51-automedia.rules
    cp /opt/arm/setup/51-automedia.rules /etc/udev/rules.d/
    udevadm control --reload
    
  • run the udevadm test... command again. This time you will see that it loads the 51-automedia.rules file, but warns that it shouldn't have an executable flag.
  • so I remove the executable flag: chmod -x /etc/udev/rules.d/51-automedia.rules
  • reload the udev rules: udevadm control --reload

It now works when I insert a new disc!

I made some other changes for Ubuntu 20.04 (not sure all of these changes are unique to that version, but it's what I ended up changing while getting it to work): https://github.com/joeskeen/automatic-ripping-machine/tree/ubuntu-20.04

@flammableliquids
Copy link
Collaborator

I believe this issue was solved by @joeskeen and should now be on the v2 master repo.

I recently rebuild my ARM to the code now in production on Ubuntu 20.04. Feel free to upgrade to the latest and test out.

Closing unless someone feels like re-opening.

@1337-server 1337-server added bug Contains a bug or code error Fixed Issue has been resolved labels Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Contains a bug or code error Fixed Issue has been resolved
Projects
None yet
8 participants