from os import environ
import msgpack
import scrapinghub as sh
print(
"",
f"msgpack.version = {msgpack.version!r}",
f"sh.__version__ = {sh.__version__!r}",
"",
sep="\n",
)
job = sh.ScrapinghubClient(environ.get("SH_APIKEY")).get_job("432787/1/1")
job.items.list(count=1)
SH_APIKEY=... python foobar.py
msgpack.version = (1, 0, 0)
sh.__version__ = '2.3.0'
Traceback (most recent call last):
File "foobar.py", line 15, in <module>
job.items.list(count=1)
File "/home/alexander-matsievsky/.miniconda3/envs/demandmatrix/lib/python3.8/site-packages/scrapinghub/client/proxy.py", line 39, in list
return list(self.iter(*args, **kwargs))
File "/home/alexander-matsievsky/.miniconda3/envs/demandmatrix/lib/python3.8/site-packages/scrapinghub/client/proxy.py", line 114, in iter
for entry in self._origin.iter_values(
File "/home/alexander-matsievsky/.miniconda3/envs/demandmatrix/lib/python3.8/site-packages/scrapinghub/hubstorage/serialization.py", line 28, in mpdecode
unpacker = Unpacker(encoding='utf8')
File "msgpack/_unpacker.pyx", line 317, in msgpack._cmsgpack.Unpacker.__init__
TypeError: __init__() got an unexpected keyword argument 'encoding'
Hi there!
When doing:
I get the following error: