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

orientdb client version errors #3

Closed
ehrenb opened this issue Aug 29, 2021 · 0 comments
Closed

orientdb client version errors #3

ehrenb opened this issue Aug 29, 2021 · 0 comments

Comments

@ehrenb
Copy link
Owner

ehrenb commented Aug 29, 2021

OrientDB's Python client has been consistently broken for the past couple years. A newer fork (orientechnologies/pyorient#42, https://github.com/brucetony/pyorient) claims to support 3.1.x, but using the 3.1.12 Docker image results in the below error:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/machina/images/identifier/src/identifier.py", line 121, in callback
    type=resolved_type)
  File "/src/pyorient/pyorient/ogm/broker.py", line 56, in create
    return self.g.create_vertex(self.element_cls, **kwargs)
  File "/src/pyorient/pyorient/ogm/graph.py", line 532, in create_vertex
    result = self.client.command(self.create_vertex_command(vertex_cls, **kwargs))[0]
  File "/src/pyorient/pyorient/orient.py", line 481, in command
    return self.get_message("CommandMessage").prepare((QUERY_CMD,) + args).send().fetch_response()
  File "/src/pyorient/pyorient/utils.py", line 48, in wrap_function
    return wrap(*args, **kwargs)
  File "/src/pyorient/pyorient/utils.py", line 61, in wrap_function
    return wrap(*args, **kwargs)
  File "/src/pyorient/pyorient/messages/commands.py", line 128, in prepare
    self._encode_field(x) for x in _payload_definition
  File "/src/pyorient/pyorient/messages/commands.py", line 128, in <genexpr>
    self._encode_field(x) for x in _payload_definition
  File "/src/pyorient/pyorient/messages/database.py", line 379, in _encode_field
    _content = struct.pack("!i", len(v)) + v
TypeError: object of type 'VertexCommand' has no len()

Until official (or stable) maintenance of the pyorient project happens, Machina will have to continue to depend on an older version of OrientDB and another pyorient fork.

Working client: https://github.com/alanmeeson/pyorient.git@0317a87369675df9b33fd38af451099c3c011d40#egg=pyorient
Working server: 2.2

@ehrenb ehrenb closed this as completed Dec 14, 2022
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