I have written a C++ program that reads for the user to press "Enter" three times within the timespan of one second. Once this occurs is opens up a Python application that has been converted to an .exe through py2exe.
This Python application seeks to open up a database and make changes. Unfortunately, the application is unable to access the database. It creates an error file.
The C++ program opens up the python file (which is an exe) with
system(path to python file);
Here is the error log file automatically generated for me.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\ccrowe\AppData\Local\Continuum\Anaconda3\lib\tkinter\__init__.py", line 1533, in __call__
File "QuickNotes.pyw", line 304, in <lambda>
File "QuickNotes.pyw", line 18, in enterSQL
sqlite3.OperationalError: unable to open database file
I have the database in the same file as the exe and I call
sqlite3.connect('records.db')
Note that I am able to connect and edit the database just fine if I open the file myself (by double clicking).
I am unsure why this is happening. Thank you for your help
Aucun commentaire:
Enregistrer un commentaire