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

Concatenation between str and bytes no longer tolerated in Python 3.8.5+ #34

Open
Abdillah opened this issue Aug 7, 2021 · 0 comments

Comments

@Abdillah
Copy link

Abdillah commented Aug 7, 2021

This package no longer compatible with Python v3.8.5+ due to the stricter nature of string concatenation.

This PR might be the solution #33.

What happened?

The following error occured using the sample provided in the README.

>>> s.query("SELECT ?q WHERE { ?q ?p ?r } LIMIT 1")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/ax9qn8myhf1d2zwa095b3zl2avm1ynwa-python3-3.8.9-env/lib/python3.8/site-packages/sparql.py", line 416, in query
    return q.query(query, timeout, raw=raw)
  File "/nix/store/ax9qn8myhf1d2zwa095b3zl2avm1ynwa-python3-3.8.9-env/lib/python3.8/site-packages/sparql.py", line 571, in query
    response = self._request(statement, timeout)
  File "/nix/store/ax9qn8myhf1d2zwa095b3zl2avm1ynwa-python3-3.8.9-env/lib/python3.8/site-packages/sparql.py", line 558, in _request
    response = self._build_response(query, opener, buf, timeout)
  File "/nix/store/ax9qn8myhf1d2zwa095b3zl2avm1ynwa-python3-3.8.9-env/lib/python3.8/site-packages/sparql.py", line 539, in _build_response
    request = self._build_request(query)
  File "/nix/store/ax9qn8myhf1d2zwa095b3zl2avm1ynwa-python3-3.8.9-env/lib/python3.8/site-packages/sparql.py", line 505, in _build_request
    uri = self.endpoint.strip() + separator + query
TypeError: can only concatenate str (not "bytes") to str

Expected

No error.

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