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

NameError: name 'instance_id' is not defined #1

Open
obrain17 opened this issue May 26, 2024 · 0 comments
Open

NameError: name 'instance_id' is not defined #1

obrain17 opened this issue May 26, 2024 · 0 comments

Comments

@obrain17
Copy link

If you run the avahi-linker in Python 3.10 (with Ubuntu 22.04) or Python 3.12. (with Ubuntu 24.04) the recordings will not be updated if config.dbus2vdr is True. Only the method using svdrp_con.sendCommand("UPDR") will work.

This is because the variable instance_id is not defined:

Traceback (most recent call last):
  File "/usr/bin/avahi-linker", line 210, in <module>
    vdr_bus_name = f"de.tvdr.vdr{instance_id if instance_id else ''}"
NameError: name 'instance_id' is not defined

same for line 707.

This message, however, is not displayed in normal run, because both occurrences are within a try: block.

I have created a fix for this: https://github.com/obrain17/avahi-linker-fix-instance_id/blob/master/usr/bin/avahi-linker. On my side it works in both Ubuntu environments mentioned above.

@seahawk1986: You might check this on your side first please, and then let me know if I should create a PR or you will “pull” it yourself.

BTW: another topic I found: The script prevent-umount-on-pause wants to

import dbus2vdr

but python3-dbus2vdr gets only installed in setup-xorg.yml, which does not run with a headless installation. Probably it could be added or moved to ‘apt’ task in roles/yavdr-network/tasks/main.yml.

Thank you very much for providing Ansible playbooks for yaVDR. I just have installed the headless version on the new Ubuntu server “noble” 24.04 using your “dists” for noble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant