It's my first time using ObjectPath, and I'm getting this error:
Traceback (most recent call last):
File "script.py", line 19, in <module>
res = tree.execute('$.issues[@.changelog.histories[@.items[0].toString is "Done"]]')
File "C:\Users\cmmartins\AppData\Local\Programs\Python\Python37-32\lib\site-packages\objectpath\core\interpreter.py", line 608, in execute
ret=exe(tree)
File "C:\Users\cmmartins\AppData\Local\Programs\Python\Python37-32\lib\site-packages\objectpath\core\interpreter.py", line 328, in exe
nodeList_append(exe((selector[0],exe(selector[1]),exe(selector[2]))))
File "C:\Users\cmmartins\AppData\Local\Programs\Python\Python37-32\lib\site-packages\objectpath\core\interpreter.py", line 234, in exe
return ret
UnboundLocalError: local variable 'ret' referenced before assignment
I don't know if my query is wrong (toString is a property, maybe this is the problem?) but the error is not being treated. I saw this issue in another repo (https://github.com/miguelgrinberg/python-socketio/issues/85), maybe this guy solution helps you.
From what I remember ObjectPath has a limitation on how you can use the current operator (@). You can use it only once per query. Run ObjectPath in debug mode and see what it is doing.
Hi!
It's my first time using ObjectPath, and I'm getting this error:
I don't know if my query is wrong (toString is a property, maybe this is the problem?) but the error is not being treated. I saw this issue in another repo (https://github.com/miguelgrinberg/python-socketio/issues/85), maybe this guy solution helps you.
Thank you!