Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-22-2021 03:07 PM
I upgraded from py2neo 4.20 to 2021.2 and not I have some python scripts that no longer work. I have tracked down many issues but am stuck with one persistent error from code that looks like this:
params = [dict(zip(headers, row)) for row in list_of_tuples]
#curs = graphConn.run(cypher, parameters = {"parameters": params}).stats() # This was the old code that worked with 4.2
graphConn.run(cypher, parameters = {"parameters": params}) # this is the new code that does not work.
And here is the trace stack:
Traceback (most recent call last):
File "neo4j_loader_mcp.py", line 353, in <module>
failed_etl = processETL(steps)
File "neo4j_loader_mcp.py", line 242, in processETL
graphConn.run(cypher, parameters = {"parameters": params})
File "/usr/local/lib/python3.6/site-packages/py2neo/database.py", line 405, in run
return self.auto().run(cypher, parameters, **kwparameters)
File "/usr/local/lib/python3.6/site-packages/py2neo/database.py", line 991, in run
readonly=self.readonly)
File "/usr/local/lib/python3.6/site-packages/py2neo/client/__init__.py", line 1340, in auto_run
return cx.auto_run(cypher, parameters, graph_name=graph_name, readonly=readonly)
File "/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py", line 886, in auto_run
self._transaction.extra, final=True)
File "/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py", line 947, in _run
response = self.append_message(0x10, cypher, parameters, extra or {})
File "/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py", line 750, in append_message
self.write_message(tag, fields)
File "/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py", line 725, in write_message
self._writer.write_message(tag, fields)
File "/usr/local/lib/python3.6/site-packages/py2neo/client/bolt.py", line 264, in write_message
packer.pack(field)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 151, in pack
self._pack_dict(value)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 285, in _pack_dict
self.pack(item)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 120, in pack
self._pack_list(value)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 247, in _pack_list
self.pack(item)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 151, in pack
self._pack_dict(value)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 285, in _pack_dict
self.pack(item)
File "/usr/local/lib/python3.6/site-packages/interchange/packstream.py", line 200, in pack
raise TypeError("Values of type %s are not supported" % type(value))
TypeError: Values of type <class 'decimal.Decimal'> are not supported
Does anyone have any ideas here?
All the sessions of the conference are now available online