sqlalchemy.exc.StatementError: (builtins.ValueError) time data '2019-02-10T19:39:13.' does not match format '%Y-%m-%dT%H:%M:%S.%f'
Bert0ni opened this issue · comments
Hello could you please help to resolve next issue with SQLAlchemy parsing ?
PS C:\Tools\roadtools> roadrecon gather --skip-first-phase
Refreshed token
Starting data gathering phase 2 of 2 (collecting properties and relationships)
Traceback (most recent call last):
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\base.py", line 1702, in _execute_context
context = constructor(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\default.py", line 1070, in _init_compiled
param = [
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\default.py", line 1071, in <listcomp>
processors[key](compiled_params[key])
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\sql\type_api.py", line 1631, in process
return impl_processor(process_param(value, dialect))
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadlib-0.12.1-py3.10.egg\roadtools\roadlib\metadef\database.py", line 32, in process_bind_param
value = datetime.datetime.strptime(value[:-2], '%Y-%m-%dT%H:%M:%S.%f')
File "C:\Python310\lib\_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "C:\Python310\lib\_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data '2019-02-10T19:39:13.' does not match format '%Y-%m-%dT%H:%M:%S.%f'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\Scripts\roadrecon-script.py", line 33, in <module>
sys.exit(load_entry_point('roadrecon==0.11.0', 'console_scripts', 'roadrecon')())
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadtools\roadrecon\main.py", line 119, in main
gathermain(args)
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadtools\roadrecon\gather.py", line 613, in main
loop.run_until_complete(run(args))
File "C:\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadtools\roadrecon\gather.py", line 537, in run
await asyncio.gather(*tasks)
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadtools\roadrecon\gather.py", line 366, in dump_linked_objects
await asyncio.gather(*jobs)
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadtools\roadrecon\gather.py", line 342, in dump_lo_to_db
commit(self.session, linkobjecttype, cache, ignore=ignore_duplicates)
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadtools\roadrecon\gather.py", line 157, in commit
engine.execute(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\orm\session.py", line 1692, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\base.py", line 1614, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\sql\elements.py", line 325, in _execute_on_connection
return connection._execute_clauseelement(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\base.py", line 1481, in _execute_clauseelement
ret = self._execute_context(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\base.py", line 1708, in _execute_context
self._handle_dbapi_exception(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\base.py", line 2026, in _handle_dbapi_exception
util.raise_(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\util\compat.py", line 207, in raise_
raise exception
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\base.py", line 1702, in _execute_context
context = constructor(
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\default.py", line 1070, in _init_compiled
param = [
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\engine\default.py", line 1071, in <listcomp>
processors[key](compiled_params[key])
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\sqlalchemy\sql\type_api.py", line 1631, in process
return impl_processor(process_param(value, dialect))
File "C:\Users\<USERNAME>\.virtualenvs\roadtools-y8aBU9zU\lib\site-packages\roadlib-0.12.1-py3.10.egg\roadtools\roadlib\metadef\database.py", line 32, in process_bind_param
value = datetime.datetime.strptime(value[:-2], '%Y-%m-%dT%H:%M:%S.%f')
File "C:\Python310\lib\_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "C:\Python310\lib\_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
sqlalchemy.exc.StatementError: (builtins.ValueError) time data '2019-02-10T19:39:13.' does not match format '%Y-%m-%dT%H:%M:%S.%f'
[SQL: INSERT OR IGNORE INTO "AppRoleAssignments" ("objectType", "objectId", "deletionTimestamp", "creationTimestamp", id, "principalDisplayName", "principalId", "principalType", "resourceDisplayName", "resourceId") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: [{'odata.type': 'Microsoft.DirectoryServices.AppRoleAssignment', 'objectType': 'AppRoleAssignment', 'objectId': '4g5ctr3V5U-UAdIujNqadHYdjdYKivtGiH7oF ... (506378 characters truncated) ... ccf-f20d-4c28-9f17-9448ea3b4648', 'principalType': 'User', 'resourceDisplayName': 'Salesforce', 'resourceId': 'cd4964a1-1b35-46c9-a678-0ba47f1d1921'}]]
PS C:\Tools\roadtools>
Thank you in advance!