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

Python 3.10 showstopping bug #33

Closed
drws opened this issue Jul 3, 2022 · 3 comments
Closed

Python 3.10 showstopping bug #33

drws opened this issue Jul 3, 2022 · 3 comments

Comments

@drws
Copy link

drws commented Jul 3, 2022

randrctl stopped working after Python 3.10 upgrade:

# randrctl auto
Traceback (most recent call last):
  File "/usr/sbin/randrctl", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/randrctl/cli.py", line 311, in main
    return cmd(randrctl, args)
  File "/usr/lib/python3.10/site-packages/randrctl/cli.py", line 181, in cmd_auto
    randrctl.switch_auto()
  File "/usr/lib/python3.10/site-packages/randrctl/ctl.py", line 77, in switch_auto
    profiles = self.profile_manager.read_all()
  File "/usr/lib/python3.10/site-packages/randrctl/profile.py", line 32, in read_all
    profiles.append(self.read_file(profile_file))
  File "/usr/lib/python3.10/site-packages/randrctl/profile.py", line 63, in read_file
    if v.get('mode'):
AttributeError: 'str' object has no attribute 'get'

This is the line in question. While I know the project is on pause, this is a question that needs to be asked. Is there a possibility for a fix or is randrctl finished?

@koiuo
Copy link
Owner

koiuo commented Jul 4, 2022

Thanks for reporting.
I no longer use the project as I didn't have an access to external displays for about a year by now.

It does look like something trivial to fix though. I'll try reproducing and fixing it later this week. Will let you know.

@koiuo
Copy link
Owner

koiuo commented Jul 13, 2022

Hi. Sorry about the late response, but I could not reproduce this on python 3.10.5.

Maybe if you shared your profiles I could figure out what's wrong exactly.

@drws
Copy link
Author

drws commented Jul 15, 2022

Oh, I see now. It's related with my testing in #32 and it happens if pos or panning field values are not quoted, but interestingly, the same doesn't hold true for the similar scale field. I've done a randrctl dump with the new Python version and reformatted profiles accordingly - it works now and closes this. Sorry for wasting your time.

@drws drws closed this as completed Jul 15, 2022
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

2 participants