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

could not convert string to float #70

Open
ghost opened this issue Apr 10, 2017 · 8 comments
Open

could not convert string to float #70

ghost opened this issue Apr 10, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Apr 10, 2017

When executing autorandr.py --change the following error message occurs:

Failed to apply profile 'xxxx' (line 233):
  could not convert string to float: 

The output of xrandr --verbose can be found here: xrandr_verbose.txt

Thanks!

Kind regards,
Martin

@phillipberndt
Copy link
Owner

Could you post the config file of the xxxx profile, please? (Or, alternatively, add a print(self.options) before line 233 and post what it prints, in particular for the pos key.)

@ghost
Copy link
Author

ghost commented Apr 11, 2017

This is the config:

output eDP1
mode primary
pos x
output DP1
off
output DP2
off
output HDMI1
mode 1920x1080
pos 0x0
primary
output HDMI2
off
output HDMI3
off
output VGA1
off
output VIRTUAL1
off

Thanks!

@phillipberndt
Copy link
Owner

Hm, with your xrandr output, I get the configuration

output eDP1
mode 1600x900
pos 0x0
primary
rate 60.00

Note the different mode and pos lines. Obviously something went quite wrong there.. do you remember which setup you've actually had when you created the configuration? autorandr --config shows what is currently being detected. It'd be insightful to see the xrandr --verbose output that led to the defective configuration.

@wasinski
Copy link

wasinski commented Aug 8, 2017

I had the same error on Manjaro with i3 and I believe it might have something to do how Manjaro's b-menu is handling autorandr profile saving.

What helped me was setting up the config using b-menu but saving the profile actually using
autorandr --save xxx
now it works like a charm

@phillipberndt
Copy link
Owner

Do I get that right, b-menu generates autorandr profiles?

@wasinski
Copy link

TBH I have no idea how this works internally but b-menu has display option where you can configure the screens using xrandr and after that save the configuration. I tried it several times every time failing with error given above. Using autorandr directly fixed it.

AFAIR autorandr isn't preinstalled with Manjaro so maybe it's using some other way of saving it and that's what causes the error

@x0zzz
Copy link

x0zzz commented May 6, 2019

Hi, I ran into same problem it seems:

~ ❯❯❯ autorandr --version
autorandr 1.8.1
~ ❯❯❯ autorandr
docked (detected)
mobile
~ ❯❯❯ autorandr -l mobile
Failed to apply profile 'mobile' (line 253):
could not convert string to float:
This appears to be a bug. Please help improving autorandr by reporting it upstream:
https://github.com/phillipberndt/autorandr/issues
Please attach the output of xrandr --verbose to your bug report if appropriate.

Here's the xrandr's output: xrandr_verbose.txt

Here's my --config:

~ ❯❯❯ autorandr --config
output HDMI-1
off
output DP-2
off
output HDMI-2
off
output DP-3
off
output HDMI-3
off
output VGA-1
crtc 2
gamma 1.389:1.0:0.714
mode 1920x1200
pos 1600x0
rate 59.95
rotate left
output DP-1
crtc 1
gamma 1.389:1.0:0.714
mode 1920x1200
pos 2800x576
rate 59.95
output eDP-1
crtc 0
gamma 1.389:1.0:0.714
mode 1600x900
pos 0x920
primary
rate 60.00

Can you please help me out?

@nolyn
Copy link

nolyn commented Feb 4, 2020

I ran into the same problem, I got
could not convert string to float
after a fresh install, calling autorandr without any options. However I was running it under wayland, which is not supported by autorandr as I just read.
However I then switched to using xorg and there autorandr works as expected.

On a side note I was able to run xrandr in wayland and it seemed to report correctly, though the format looks different than in xorg.

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

No branches or pull requests

4 participants