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

TypeError : can't pickle JObject objects #29

Open
judith-lambert-m opened this issue Sep 21, 2020 · 0 comments
Open

TypeError : can't pickle JObject objects #29

judith-lambert-m opened this issue Sep 21, 2020 · 0 comments

Comments

@judith-lambert-m
Copy link

using the API and PythonNet to control the robot in c#
sending a JSON object in the move() method raise an error

JObject prm = new JObject(new JProperty("movement", 1), new JProperty("path", "joint"), new JProperty("j0", 20)); robot_.move(prm);

error : Python.Runtime.PythonException: 'TypeError : can't pickle JObject objects'

error info:
File "C:\python37\lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\api.py", line 1904, in play
data = self.command({"id": id_list})
File "C:\python37\lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\api.py", line 955, in command
_result = self._command_mask(_result)
File "C:\python37\lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\api.py", line 878, in _command_mask
x = copy.deepcopy(c)
File "C:\python37\Lib\copy.py", line 150, in deepcopy
y = copier(x, memo)
File "C:\python37\Lib\copy.py", line 241, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\python37\Lib\copy.py", line 169, in deepcopy
rv = reductor(4)

at Python.Runtime.PyObject.Invoke(PyTuple args, PyDict kw)
at Python.Runtime.PyObject.InvokeMethod(String name, PyTuple args, PyDict kw)
at Python.Runtime.PyObject.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
at CallSite.Target(Closure , CallSite , Object , JObject )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)

looks like the problem would be in deepcopy

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