You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporarily, I edited sparql.py under the path given by pip show sparql-client.
Replacing encodestring to encodebytes solved the error on Python 3.9. Just for your information.
(However, that is used in BASIC authentication https://github.com/eea/sparql-client/blob/master/sparql.py#L421 and I've not tried the code with restricted websites.)
@rjalexa I didn't checked but I found a solution: after import collections, put
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
from collections.abc import MutableMapping
else:
from collections import MutableMapping
The function base64.encodestring is deprecated since Python 3.1 and was removed in Python 3.9. It is used here:
https://github.com/eea/sparql-client/blob/master/sparql.py#L50
You may use use base64.encodebytes() instead.
The text was updated successfully, but these errors were encountered: