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

TypeError in seat_reservation.py #14

Open
simonprickett opened this issue Jul 12, 2023 · 0 comments
Open

TypeError in seat_reservation.py #14

simonprickett opened this issue Jul 12, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@simonprickett
Copy link
Contributor

Error reported on Discord with https://github.com/redislabs-training/ru101/blob/main/redisu/ru101/uc03-seat-reservation/seat_reservation.py

Received error when running seat reservation python.

        (_, tier_name, blockname) = block.rsplit(":", 2)
                                       ^^^^^^^^^^^^^^^^^^^^
         TypeError: a bytes-like object is required, not 'str'

Resolved by adding extra line to do the conversion. Tried using Python 3.11 and 3.8. It maybe a python 2 versus 3 difference....

Added a line to do conversion and it works fine.

    block = block.decode("utf-8") 
    (, tier_name, block_name) = block.rsplit(":", 2)

Look into this and adjust as needed.

@simonprickett simonprickett added the bug Something isn't working label Jul 12, 2023
@simonprickett simonprickett self-assigned this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant