Closed drj11 closed 9 years ago
You can provoke essentially the same bug (I think) by trying the same GeoJSON tool twice.
I get this one, which I have a hunch is related.
e22n7kq@cobalt-p:~$ ./tool/do.py
Traceback (most recent call last):
File "./tool/do.py", line 161, in <module>
do_spreadsheet(spreadsheet_csv_url)
File "./tool/do.py", line 101, in do_spreadsheet
process_person_cols(person)
File "./tool/do.py", line 72, in process_person_cols
scraperwiki.sqlite.save(['name', 'start'], data, table_name="holidays")
File "/usr/local/lib/python2.7/dist-packages/scraperwiki/sql.py", line 188, in save
connection.execute(insert.values(row))
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 729, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 321, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1160, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (OperationalError) no such table: holidays u'INSERT OR REPLACE INTO holidays (name, start, "end", days, status) VALUES (?, ?, ?, ?, ?)'
Now that I've pretty much fixed it, I can see that it's cause by a DROP
in .execute()
.
What I did to get this is not so clear. I had a pre-existing GeoJSON tool into which I had copied a sqlite file, then I changed the code to the
shapefile
branch ofgeojson-tool
and then poked it with the UI.Investigating.