corpnewt / ProperTree

Cross platform GUI plist editor written in python.
BSD 3-Clause "New" or "Revised" License
2.66k stars 432 forks source link

How to fix not run in linux python error.. #188

Open kocoman2 opened 1 week ago

kocoman2 commented 1 week ago

edit: ok I have to remove ", ctypes" https://github.com/corpnewt/ProperTree/commit/44b5bb132f2f76dc8355d9f3e310dd3d97317d45

./ProperTree.py Traceback (most recent call last): File "ProperTree-master/./ProperTree.py", line 2, in import sys, os, binascii, base64, json, re, subprocess, webbrowser, multiprocessing, signal, ctypes File "/usr/lib/python3.12/ctypes/init.py", line 157, in class py_object(_SimpleCData): AttributeError: class must define a 'type' attribute

Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux

thx

corpnewt commented 1 week ago

Hmm - that looks to be an issue importing the built-in module ctypes which comes with the standard lib. I wonder if there's some issue with your python install? You could try opening a terminal, then typing python3 to start the python interpreter, then type import ctypes and see if it reports the same error. If so - then it's not an issue with ProperTree, but likely with your python install or local env.

Alternatively, if others have the same issue, I can wrap the ctypes import in a try/except to catch errors - but since it's a built-in module, that shouldn't be needed.

-CorpNewt