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

Fix Traceback in patient's samples view when name has special characters #63

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Jan 20, 2023

Description of the issue/feature this PR addresses

This Pull Request fixes a Traceback in patient's samples listing when the name of the patient contains special characters (e.g. "Ramón Turró")

Current behavior before PR

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 250, in publish
  Module ZPublisher.BaseRequest, line 518, in traverse
  Module ZPublisher.BaseRequest, line 349, in traverseName
  Module plone.dexterity.browser.traversal, line 52, in publishTraverse
  Module ZPublisher.BaseRequest, line 117, in publishTraverse
  Module zope.component._api, line 116, in queryMultiAdapter
  Module zope.interface.registry, line 365, in queryMultiAdapter
  Module zope.interface.adapter, line 844, in queryMultiAdapter
  Module senaite.patient.browser.patient.samples, line 13, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)

Desired behavior after PR is merged

The samples listing of the Patient is displayed correctly without error

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

```
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 250, in publish
  Module ZPublisher.BaseRequest, line 518, in traverse
  Module ZPublisher.BaseRequest, line 349, in traverseName
  Module plone.dexterity.browser.traversal, line 52, in publishTraverse
  Module ZPublisher.BaseRequest, line 117, in publishTraverse
  Module zope.component._api, line 116, in queryMultiAdapter
  Module zope.interface.registry, line 365, in queryMultiAdapter
  Module zope.interface.adapter, line 844, in queryMultiAdapter
  Module senaite.patient.browser.patient.samples, line 13, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)
```
@xispa xispa added the bug Something isn't working label Jan 20, 2023
Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@ramonski ramonski merged commit 7ffb3eb into master Jan 20, 2023
@ramonski ramonski deleted the fix-decode-fullname branch January 20, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants