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

disambiguate broken because of unicode/str mix in mechRepr results #38

Closed
icemac opened this issue Oct 17, 2017 · 0 comments
Closed

disambiguate broken because of unicode/str mix in mechRepr results #38

icemac opened this issue Oct 17, 2017 · 0 comments
Assignees

Comments

@icemac
Copy link
Member

icemac commented Oct 17, 2017

The following scenario error leads to an error:

  • A page contains a submit control whose value contains a non-ASCII character.
  • There is also a select with options or a text input field on this page.
  • browser.getControl() is used to select a not existing control.

This leads to a UnicodeDecodeError when zope.testbrowser tries to render the list of possible controls using the mechRepr of the controls. The exception happens when joining the mechRepr values of the controls because to a single string. The ones of the select options and text fields are unicode while the one of the submit control is str but contains a non-ASCII char.

@icemac icemac self-assigned this Oct 17, 2017
icemac pushed a commit that referenced this issue Oct 17, 2017
Fixes #38

As the scenario described in the ticket requires the `mechRepr` to be of the same type for all controls I decided to adapt the two remaining control classes which returned unicode to the str approach used by of the majority of the controls.
icemac pushed a commit that referenced this issue Oct 18, 2017
Fixes #38

As the scenario described in the ticket requires the `mechRepr` to be of the same type for all controls I decided to adapt the two remaining control classes which returned unicode to the str approach used by of the majority of the controls.
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