John Boyle
05/24/2022, 6:16 AMTypeError: '<' not supported between instances of 'str' and 'NoneType'
File "D:\dev\dagster\dagster\venv\lib\site-packages\dagster_graphql\implementation\utils.py", line 49, in _fn
return fn(*args, **kwargs)
File "D:\dev\dagster\dagster\venv\lib\site-packages\dagster_graphql\implementation\fetch_assets.py", line 38, in get_assets
materialized_keys = instance.get_asset_keys(
File "D:\dev\dagster\dagster\venv\lib\site-packages\dagster\utils\__init__.py", line 616, in inner
return func(*args, **kwargs)
File "D:\dev\dagster\dagster\venv\lib\site-packages\dagster\core\instance\__init__.py", line 1335, in get_asset_keys
return self._event_storage.get_asset_keys(prefix=prefix, limit=limit, cursor=cursor)
File "D:\dev\dagster\dagster\venv\lib\site-packages\dagster\core\storage\event_log\sql_event_log.py", line 833, in get_asset_keys
asset_keys = [AssetKey.from_db_string(row[1]) for row in sorted(rows, key=lambda x: x[1])]
You can easily recreate this by running the materializations.py tutorial
dagster\examples\docs_snippets\docs_snippets\intro_tutorial\advanced\materializations
if you run it one time, going to http://127.0.0.1:3000/instance/assets results in the usual result where you can see the sorted_cereals_csv asset defined in the example. However, if you change asset_key="sorted_cereals_csv" to asset_key="" and then rerun the job, you get the error at the top of this post.
the bummer is that if you fix the error and then re-run the job, going to http://127.0.0.1:3000/instance/assets still results in the error (presumably breaking on reading the asset with the blank key). I tried deleting the offending run but it didn't seem to affect the assets. and since I can't load up the assets page, I can't wipe the bad assets.
also, I can go to the working job and still load up the properly labeled assets, but it's basically broken the repo for now.
is there a way to fix this so my repo will work properly again? (i.e. load up the /assets/ page again).sean
05/25/2022, 4:56 PMsandy
05/25/2022, 4:58 PMprha
05/25/2022, 5:23 PMsean
05/25/2022, 5:24 PMprha
05/25/2022, 5:25 PMdelete from asset_keys where asset_key is null;
John Boyle
05/25/2022, 5:26 PMsean
05/25/2022, 5:43 PMJohn Boyle
05/25/2022, 7:09 PMselect * from asset_keys where asset_key is null;
seems to find the null keys, when I run the delete command, it doesn't seem to find the null keys and nothing is deleted. I'm using python to do this
select_result = [a for a in cur.execute('select * from asset_keys where asset_key is null;')]
delete_result = [a for a in cur.execute('delete from asset_keys where asset_key is null;')]
print(select_result)
print(delete_result)
select_result looks correct. [(0, None, '{"__ class __" : "EventLogHistory ... ]
delete_result = []sean
05/25/2022, 7:12 PMJohn Boyle
05/25/2022, 7:15 PMcur.commit()
John Boyle
05/25/2022, 7:16 PMJohn Boyle
05/25/2022, 7:16 PMsean
05/25/2022, 7:20 PM