yoyu777 / ml-demo

7 stars 2 forks source link

Glue ETL 'cannot insert xxxxxx, already exists' #12

Closed yoyu777 closed 4 years ago

yoyu777 commented 4 years ago

Traceback (most recent call last): File "/tmp/runscript.py", line 118, in runpy.run_path(temp_file_path, run_name='main') File "/usr/local/lib/python3.6/runpy.py", line 263, in run_path pkg_name=pkg_name, script_name=fname) File "/usr/local/lib/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/glue-python-scripts-yikfjqlw/glue-etl.py", line 188, in File "/tmp/glue-python-scripts-yikfjqlw/glue-etl.py", line 91, in get_historical_price File "/usr/local/lib/python3.6/site-packages/pandas/core/frame.py", line 3473, in insert allow_duplicates=allow_duplicates) File "/usr/local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1149, in insert raise ValueError('cannot insert {} , already exists'.format(item)) ValueError: cannot insert 1585660328170, already exists

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/tmp/runscript.py", line 137, in raise e_type(e_value).with_tracsback(new_stack) AttributeError: 'ValueError' object has no attribute 'with_tracsback'