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

Getting error when viewing the group URL (qrencode+Python3.10 compatibility problem) #158

Closed
digitalblur opened this issue Dec 9, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@digitalblur
Copy link

digitalblur commented Dec 9, 2022

After creating a group and viewing the group from the web page, the QR code is a broken image. When I view the QR code URL I get the error:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

and logs show the errors below:
Dec 9 06:52:12 test uwsgi[44550]: #33[32m2022-12-09 06:52:12,979#033[0m #33[35mtest#033[0m #33[34msogs.web[44550]#33[0m #33[1;30mERROR#033[0m #33[31mException on /r/test/invite.png [GET]#33[0m
Dec 9 06:52:12 test uwsgi[44550]: Traceback (most recent call last):
Dec 9 06:52:12 test uwsgi[44550]: File "/usr/lib/python3/dist-packages/flask/app.py", line 2070, in wsgi_app
Dec 9 06:52:12 test uwsgi[44550]: response = self.full_dispatch_request()
Dec 9 06:52:12 test uwsgi[44550]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1515, in full_dispatch_request
Dec 9 06:52:12 test uwsgi[44550]: rv = self.handle_user_exception(e)
Dec 9 06:52:12 test uwsgi[44550]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1513, in full_dispatch_request
Dec 9 06:52:12 test uwsgi[44550]: rv = self.dispatch_request()
Dec 9 06:52:12 test uwsgi[44550]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1499, in dispatch_request
Dec 9 06:52:12 test uwsgi[44550]: return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Dec 9 06:52:12 test uwsgi[44550]: File "/usr/lib/python3/dist-packages/sogs/routes/views.py", line 64, in serve_invite_qr
Dec 9 06:52:12 test uwsgi[44550]: img = qrencode.encode(room.url)
Dec 9 06:52:12 test uwsgi[44550]: File "/usr/lib/python3/dist-packages/qrencode/init.py", line 47, in encode
Dec 9 06:52:12 test uwsgi[44550]: version, size, data = _encode(data, version, level, hint, True)
Dec 9 06:52:12 test uwsgi[44550]: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

OS is a fresh Ubunto 20.04
Python version: 3.10.6

Followed install steps here for sogs-standalone:
https://docs.oxen.io/products-built-on-oxen/session/guides/open-group-setup

Any ideas? thx

@zcyph
Copy link
Contributor

zcyph commented Jan 1, 2023

I am having the same issue with sogs-proxied in Ubuntu 22.04, tested the apt package and the manual installation, with nginx and Caddy and Python 3.10.6.

@jagerman
Copy link
Member

jagerman commented Jan 2, 2023

It seems the issue here is a problem with something in the qrencode package (e.g. there's an Arch Linux bug report about it here: https://bugs.archlinux.org/task/73372). I think we need to switch to qrcode rather than qrencode for generating the QR code for better compatibility.

@jagerman jagerman added bug Something isn't working good first issue Good for newcomers labels Jan 2, 2023
@jagerman jagerman changed the title Getting error when viewing the group URL Getting error when viewing the group URL (qrencode+Python3.10 compatibility problem) Jan 2, 2023
@jagerman
Copy link
Member

jagerman commented Jan 9, 2023

Fixed by #161

@jagerman jagerman closed this as completed Jan 9, 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 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants