Closed Sia-Namir closed 1 year ago
When show_progress = True we will have following error: ########### sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed: equity_symbol_mappings.symbol [SQL: INSERT INTO equity_symbol_mappings (id, symbol, start_date, share_class_symbol, company_symbol, end_date, sid) VALUES (?, ?, ?, ?, ?, ?, ?)] [parameters: (0, None, 0, '', '', 0, 0)] ############
because after this lines(198-202) of csvdir.py: ############ fnames = { f.name.split(".")[0]: f.name for f in files if f.is_file() and f.name.split(".")[0] in it } ############
"it" will not be available and the rest of the code will not be executed(204-....): ############ for sid, symbol in enumerate(it): logger.debug(f"{symbol}: sid {sid}") fname = fnames.get(symbol, None) ############
Build using my latest PR it will work
Closed by #168
When show_progress = True we will have following error: ########### sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed: equity_symbol_mappings.symbol [SQL: INSERT INTO equity_symbol_mappings (id, symbol, start_date, share_class_symbol, company_symbol, end_date, sid) VALUES (?, ?, ?, ?, ?, ?, ?)] [parameters: (0, None, 0, '', '', 0, 0)] ############
because after this lines(198-202) of csvdir.py: ############ fnames = { f.name.split(".")[0]: f.name for f in files if f.is_file() and f.name.split(".")[0] in it } ############
"it" will not be available and the rest of the code will not be executed(204-....): ############ for sid, symbol in enumerate(it): logger.debug(f"{symbol}: sid {sid}") fname = fnames.get(symbol, None) ############