-
Notifications
You must be signed in to change notification settings - Fork 19
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
Execution is failing with AttributeError: module 'ctypes' has no attribute 'windll' #19
Comments
OneDriveExplorer only works on Windows. The CLI version will probably work. You can comment out lines 45 and 46 in odl.py. Let me know if this works and I can put in a fix for the CLI. The GUI would take more effort to make it cross platform.
|
Hi Brian, the cli script now start, but it does not parse the .dat file. I tested the file in the compiled Windows version and it worked fine. 535086f03efc0fb2.dat.zip Second issue I had was that what what ever reason I was not able to get autocomplete on the filename, had to put it into the cli manually. Other scripts in that virtenv works fine. And one more SyntaxWarning for deprecated escaping syntax. This is probably related to changes in Python 3.12 python3 OneDriveExplorer.py -f ./535086f03efc0fb2.dat --debug 2024-07-19 18:48:17, INFO, Start parsing .\535086f03efc0fb2.dat. Unable to parse .\535086f03efc0fb2.dat. 2024-07-19 18:48:17, WARNING, Unable to parse .\535086f03efc0fb2.dat. Thank you for your time |
Not sure what would cause the autocomplete issue (has nothing to do with the program). The other thing that comes to mind would be to check the line endings of the files. It was written on Windows so the line endings may be \r\n. |
Regards the autocomplete, it is affected by the short -f switch, as you can se bellow it python3 OneDriveExplorer.py -f Long switch --file will work fine and will show all the files .txt and .dat included. python3 OneDriveExplorer.py --file For the rest I check the end lines, and converted the script to LF, but it had no effect. I saw you using this to parse out filename and path: I refactor it to more OS agnostic way. When executed your account variable is empty, the normalized_path account path has value DATA. python3 OneDriveExplorer.py --file $HOME/DATA/535086f03efc0fb2.dat args.file'/home/ubuntu/DATA/535086f03efc0fb2.dat' I attached code snippet I used for debugging, but I am kind of stuck on this. Any idea what can be the problem ? |
Hi Brian,
I am trying to run CLI version of your tools, but it is failing with the following error:
File "/home/ubuntu/tools/OneDriveExplorer/OneDriveExplorer/OneDriveExplorer.py", line 39, in
from ode.parsers.odl import parse_odl, load_cparser
File "/home/ubuntu/tools/OneDriveExplorer/OneDriveExplorer/ode/parsers/odl.py", line 45, in
kernel32 = ctypes.windll.kernel32
^^^^^^^^^^^^^
AttributeError: module 'ctypes' has no attribute 'windll'
I additionally I installed pywin32-ctypes (0.2.2) via pip, but it did not helped.
Could you please suggest how to fix it ?
Also would you considered adding pyproject-toml, so it is possible to deploy your project directly with PIP ?
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
Thank you
Requirements satisfied:
Requirement already satisfied: ttkthemes in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 1)) (3.2.2)
Requirement already satisfied: Pillow in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 2)) (10.4.0)
Requirement already satisfied: pandas in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 3)) (2.2.2)
Requirement already satisfied: numpy in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 4)) (2.0.0)
Requirement already satisfied: pytz in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 5)) (2024.1)
Requirement already satisfied: python-registry in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 6)) (1.3.1)
Requirement already satisfied: keyboard in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 7)) (0.13.5)
Requirement already satisfied: openpyxl in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 8)) (3.1.5)
Requirement already satisfied: pandastable in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 9)) (0.13.1)
Requirement already satisfied: dissect.cstruct in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 10)) (4.0)
Requirement already satisfied: psutil in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 11)) (6.0.0)
Requirement already satisfied: pytsk3 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 12)) (20231007)
Requirement already satisfied: quickxorhash in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 13)) (1.0.5)
Requirement already satisfied: pycryptodome in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 14)) (3.20.0)
Requirement already satisfied: ruamel.yaml in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 15)) (0.18.6)
Requirement already satisfied: Cerberus in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from -r requirements.txt (line 16)) (1.3.5)
Requirement already satisfied: python-dateutil>=2.8.2 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from pandas->-r requirements.txt (line 3)) (2.9.0.post0)
Requirement already satisfied: tzdata>=2022.7 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from pandas->-r requirements.txt (line 3)) (2024.1)
Requirement already satisfied: enum-compat in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from python-registry->-r requirements.txt (line 6)) (0.0.3)
Requirement already satisfied: unicodecsv in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from python-registry->-r requirements.txt (line 6)) (0.14.1)
Requirement already satisfied: et-xmlfile in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from openpyxl->-r requirements.txt (line 8)) (1.1.0)
Requirement already satisfied: matplotlib>=3.0 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from pandastable->-r requirements.txt (line 9)) (3.9.1)
Requirement already satisfied: numexpr>=2.4 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from pandastable->-r requirements.txt (line 9)) (2.10.1)
Requirement already satisfied: xlrd>=0.9 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from pandastable->-r requirements.txt (line 9)) (2.0.1)
Requirement already satisfied: future in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from pandastable->-r requirements.txt (line 9)) (1.0.0)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from ruamel.yaml->-r requirements.txt (line 15)) (0.2.8)
Requirement already satisfied: contourpy>=1.0.1 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from matplotlib>=3.0->pandastable->-r requirements.txt (line 9)) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from matplotlib>=3.0->pandastable->-r requirements.txt (line 9)) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from matplotlib>=3.0->pandastable->-r requirements.txt (line 9)) (4.53.1)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from matplotlib>=3.0->pandastable->-r requirements.txt (line 9)) (1.4.5)
Requirement already satisfied: packaging>=20.0 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from matplotlib>=3.0->pandastable->-r requirements.txt (line 9)) (24.1)
Requirement already satisfied: pyparsing>=2.3.1 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from matplotlib>=3.0->pandastable->-r requirements.txt (line 9)) (3.1.2)
Requirement already satisfied: six>=1.5 in /home/ubuntu/pyOneDrive/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas->-r requirements.txt (line 3)) (1.16.0)
The text was updated successfully, but these errors were encountered: