failes if resolution contains non numeric characters

Bug #873753 reported by Mugen Kenichi
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ARandR
Confirmed
Undecided
chrysn

Bug Description

xrandr output of my display:

*snip*
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080 60.0*+
   1920x1080i 25.0
   1600x1200 60.0
*snip*

Resulting in:

Traceback (most recent call last):
  File "/usr/bin/arandr-2.7", line 25, in <module>
    main()
  File "/usr/lib64/python2.7/site-packages/screenlayout/gui.py", line 302, in main
    force_version=options.force_version
  File "/usr/lib64/python2.7/site-packages/screenlayout/gui.py", line 143, in __init__
    self.filetemplate = self.widget.load_from_x()
  File "/usr/lib64/python2.7/site-packages/screenlayout/widget.py", line 77, in load_from_x
    self._xrandr.load_from_x()
  File "/usr/lib64/python2.7/site-packages/screenlayout/xrandr.py", line 134, in load_from_x
    o.modes.append(Size(int(a) for a in d.strip().split(" ")[0].split("x")))
  File "/usr/lib64/python2.7/site-packages/screenlayout/auxiliary.py", line 37, in __new__
    arg = tuple(arg)
  File "/usr/lib64/python2.7/site-packages/screenlayout/xrandr.py", line 134, in <genexpr>
    o.modes.append(Size(int(a) for a in d.strip().split(" ")[0].split("x")))
ValueError: invalid literal for int() with base 10: '1080i'

I did a naive hackaround with re ignoring resolutions with non numeric characters to make it "work on my machine" (TM)

Revision history for this message
chrysn (chrysn) wrote :

this is a known bug (debian bug 507521), and there is a development branch where it is fixed. please try checking it out using:

git clone git://gitorious.org/arandr/arandr.git
cd arandr
git checkout cglita
./arandr

chrysn (chrysn)
affects: arandr (Ubuntu) → arandr
Changed in arandr:
assignee: nobody → chrysn (chrysn)
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.