vesoft-inc / nebula-python

Client API of Nebula Graph in Python
193 stars 78 forks source link

the module cannot analyse return data that contains datetime type #130

Closed coder9582 closed 3 years ago

coder9582 commented 3 years ago

example code in README.md:

session = connection_pool.get_session('root', 'nebula')
result = session.execute('example')

In class Session init,
self._timezone_offset = auth_result.get_timezone_offset() It may expect an integer value, but actually it's None. so it calls an error:

File "nebula2/data/DataObject.py", line 885, in __repr__
    return "utc datetime: %d-%02d-%02dT%02d:%02d:%02d.%06d, timezone_offset: %d" % (
TypeError: %d format: a number is required, not NoneType
Aiee commented 3 years ago

This could happen when querying data while the data was not ready. Feel free to reopen this issue if the problem remains.