Skip to content
New issue

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

Crash in access.py if database already open #6

Open
danshearer opened this issue Nov 28, 2023 · 1 comment
Open

Crash in access.py if database already open #6

danshearer opened this issue Nov 28, 2023 · 1 comment
Assignees

Comments

@danshearer
Copy link
Member

@mike1813 pointed out the following crashbug in access.py when a process (usually Access) has the .accdb file open already:

python src\kraken.py pull stuff\fred.accdb stuff Traceback (most
recent call
last):
File "C:\Users\ms\github\Access-Tool\src\kraken.py", line 51, in
dumpAllForms(access, settings)
File "C:\Users\ms\github\Access-Tool\src\access\form.py", line 44,
in dumpAllForms
allForms = a.currentProject().AllForms
^^^^^^^^^^^^^^^^^^
File "C:\Users\ms\github\Access-Tool\src\access\access.py", line 53,
in currentProject
self.__open_access()
File "C:\Users\ms\github\Access-Tool\src\access\access.py", line 79,
in __open_access
self.__app.Application.OpenCurrentDatabase(self.path)
File "C:\Users\ms\AppData\Local\Temp\gen_py\3.12\4AFFC9A0-5F99-
101B-AF4E-00AA003F0F07x0x9x0_Application.py", line 496, in
OpenCurrentDatabase
return self.ApplyTypes(2382, 1, (24, 32), ((8, 1), (11, 49), (8,
49)), 'OpenCurrentDatabase', None,filepath

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ms\AppData\Local\Programs\Python\Python312\Lib\site-
packages\win32com\client_init_.py", line 574, in ApplyTypes
self.oleobj.InvokeTypes(dispid, 0, wFlags, retType, argTypes,
*args),

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None,
'You already have the database open.', None, -1, -2146820421), None)

@danshearer danshearer assigned danshearer and Jaso5 and unassigned danshearer Nov 28, 2023
@mike1813
Copy link
Member

Actually, it doesn't seem to be necessary to have the database you are processing open. Just running Access seems to be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants