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

AttributeError: 'dict' object has no attribute 'index' #205

Closed
qcasey opened this issue Apr 6, 2021 · 8 comments
Closed

AttributeError: 'dict' object has no attribute 'index' #205

qcasey opened this issue Apr 6, 2021 · 8 comments
Labels
bug Something isn't working fixed Issue is fixed in the current or next release.
Milestone

Comments

@qcasey
Copy link

qcasey commented Apr 6, 2021

I got this error when typing "gnome" when asked for what profile to install. It is thrown on this line:

selected_profile = options[options.index(selected_profile)]

Would a selected_profile = options[list(options).index(selected_profile)] solve this one?

can't copy text from this VM just remembered screenshots exist

Screenshot from 2021-04-06 12-19-58

@dylanmtaylor
Copy link
Contributor

Instead of typing gnome you should have hit '2'. That said, looking up the index by value on an error might work to recover from a situation where a user inputs the value instead of number.

@Torxed
Copy link
Member

Torxed commented Apr 6, 2021

Instead of typing gnome you should have hit '2'. That said, looking up the index by value on an error might work to recover from a situation where a user inputs the value instead of number.

Agreed, this option was meant to be a number-input, but it should also support by name, so this is a mistake on my end :)

@qcasey
Copy link
Author

qcasey commented Apr 6, 2021

It looks like the line that threw the error already tries to account for this, in the way you said. I think the list conversion in my OP might fix 😃

I was using numbers up until that point, but what threw me off was the installer asking for "Enter a pre-programmed profile name". Anyway, it's a cool installer, thanks for writing it!

@Torxed
Copy link
Member

Torxed commented Apr 6, 2021

We, and by we I mean me, should really start using generic_select() which supports both numbers and text-input.

@dylanmtaylor
Copy link
Contributor

FYI, this seems to be resolved in master and can probably be closed:

VirtualBox_arch_11_04_2021_20_41_29

@dylanmtaylor
Copy link
Contributor

Note that this issue persists for the graphics driver selection, and I would rework it in master, but there are substantial changes to this GPU driver selection logic being made in 2.2.0, so it'll probably get fixed in that version :)

@dylanmtaylor
Copy link
Contributor

dylanmtaylor commented Apr 22, 2021

This should be fixed in the latest RC, and 2.2.0 with its reworked graphics driver selections. Please test the ISO on https://github.com/archlinux/archinstall/releases/tag/v2.1.4-RC2

@Torxed
Copy link
Member

Torxed commented Apr 26, 2021

This was fixed in v2.1.4 (released yesterday). Generally we did a lot of improvements to the selection process and this specific error shouldn't happen anymore. If it does, feel free to poke me and I'll re-open! :)

@Torxed Torxed closed this as completed Apr 26, 2021
@Torxed Torxed added fixed Issue is fixed in the current or next release. bug Something isn't working labels Apr 26, 2021
@Torxed Torxed added this to the v2.1.4 milestone Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue is fixed in the current or next release.
Projects
None yet
Development

No branches or pull requests

3 participants