We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The first time I run below code (tmpo.sqlit3 does not exist yet), it works.
But when I run it a second time (thus when tmpo.sqlite3 already exists), it fails with the following error:
In[2]: from opengrid_dev.library import houseprint ...: hp = houseprint.Houseprint() ...: hp.sync_tmpos() Backend TkAgg is interactive backend. Turning interactive mode on. Opening connection to Houseprint sheet Opening spreadsheets Parsing spreadsheets 35 Sites created 36 Devices created 102 sensors created Houseprint parsing complete 0%| | 0/102 [00:00<?, ?it/s]Using tmpo database from C:\Users\kdb\tmpo\tmpo.sqlite3 1%| | 1/102 [00:00<00:16, 6.22it/s] Traceback (most recent call last): File "C:\GitLab\opengrid_dev\venv\lib\site-packages\IPython\core\interactiveshell.py", line 2910, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-e58e45ca9dc8>", line 4, in <module> hp.sync_tmpos() File "C:\GitLab\opengrid_dev\opengrid_dev\library\houseprint\houseprint.py", line 489, in sync_tmpos tmpos.sync(sensor.key) File "C:\GitLab\opengrid_dev\venv\lib\site-packages\tmpo\__init__.py", line 165, in wrapper raise e File "C:\GitLab\opengrid_dev\venv\lib\site-packages\tmpo\__init__.py", line 157, in wrapper result = func(*args, **kwargs) File "C:\GitLab\opengrid_dev\venv\lib\site-packages\tmpo\__init__.py", line 277, in sync self._req_sync(sid, rid, lvl, bid) File "C:\GitLab\opengrid_dev\venv\lib\site-packages\tmpo\__init__.py", line 553, in _req_sync f.result(), sid, t["rid"], t["lvl"], t["bid"], t["ext"]) File "C:\GitLab\opengrid_dev\venv\lib\site-packages\tmpo\__init__.py", line 569, in _write_block self.dbcur.execute(SQL_TMPO_INS, (sid, rid, lvl, bid, ext, now, blk)) sqlite3.IntegrityError: UNIQUE constraint failed: tmpo.sid, tmpo.rid, tmpo.lvl, tmpo.bid```
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The first time I run below code (tmpo.sqlit3 does not exist yet), it works.
But when I run it a second time (thus when tmpo.sqlite3 already exists), it fails with the following error:
The text was updated successfully, but these errors were encountered: