You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue probably relates to #22. I've tried the Python tutorial and when running the code for Step 4, the execution fails when calling import_objects, because the previous call returns everything as type string:
which leads to a crash with this error message:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/alex/Repositories/TerminusDbPlayground/update_data.py", line 17, in <module>
destiny = data_schema.import_objects(destiny_raw)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 705, in import_objects
return self._construct_object(obj_dict)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 613, in _construct_object
params[key] = convert_if_object(type_dict[key], value)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 595, in convert_if_object
return self._construct_object(value)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 620, in _construct_object
return create_obj(type_class, obj_id, params)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 561, in create_obj
new_obj.__init__(new_obj, **params)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 142, in init
setattr(obj, key, value)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 193, in __setattr__
_check_mismatch_type(name, value, correct_type)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/terminusdb_client/schema/schema.py", line 70, in _check_mismatch_type
check_type(prop, prop_value, prop_type)
File "/Users/alex/Repositories/TerminusDbPlayground/venv/lib/python3.9/site-packages/typeguard/__init__.py", line 785, in check_type
raise TypeError(
TypeError: type of street_num must be int; got str instead
python-BaseException
In the database, the type is correctly set as integer:
I'm not sure if I did something wrong in the tutorial, or whether something in the system is not working as intended.
Debug information:
Python 3.9
Terminusdb-client 10.2.0
DB from Docker (terminusdb.docker.scarf.sh/terminusdb/terminusdb-server) image (Image ID d1de6df881c9).
Running ./terminusdb-container cli from TerminusDB Bootstrap also fails with the message unknown shorthand flag: 'i' in -i
The text was updated successfully, but these errors were encountered:
Good catch! This was due to changes in TerminusDB 11 which represents big numbers with strings to support a broader range of languages (as well as GraphQL) but we missed this bit in the Python Client. We've made a patch to the Python Client and we are releasing v10.2.1 with the fix.
This issue probably relates to #22. I've tried the Python tutorial and when running the code for Step 4, the execution fails when calling
import_objects
, because the previous call returns everything as type string:which leads to a crash with this error message:
In the database, the type is correctly set as integer:
I'm not sure if I did something wrong in the tutorial, or whether something in the system is not working as intended.
Debug information:
Running
./terminusdb-container cli
from TerminusDB Bootstrap also fails with the messageunknown shorthand flag: 'i' in -i
The text was updated successfully, but these errors were encountered: