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

Saves blank plists on python 3 (Arch Linux) #19

Closed
AnsonX10 opened this issue Mar 14, 2020 · 4 comments · Fixed by #43
Closed

Saves blank plists on python 3 (Arch Linux) #19

AnsonX10 opened this issue Mar 14, 2020 · 4 comments · Fixed by #43

Comments

@AnsonX10
Copy link

It would be nice if it either worked on python 3, or stopped and told people to use python 2 instead of just erasing your plist entries. It might behave differently on different distros, but I'm too lazy to check.

TypeError: expected bytes, str found
Exception ignored in: 'plist.create_dict_plist'
Traceback (most recent call last):
  File "/home/anson/Downloads/ProperTree-master/Scripts/plistwindow.py", line 1407, in save_plist_as
    plist_text = plist.dumps(plist_data,sort_keys=self.controller.settings.get("sort_dict",False))
TypeError: expected bytes, str found

@corpnewt
Copy link
Owner

Hmm - that's interesting. The back end for ProperTree shouldn't have issues on python 2 or 3. I just tested on Windows 10 and it saved a new test plist just fine using python 3.7.6:

image

I don't personally use linux - so someone else may have to look into debugging that, but at least on macOS and Windows, there's no python 2 requirement.

-CorpNewt

@AnsonX10
Copy link
Author

It works fine on python 2 in linux and I've seen other linux users in hackintosh discords have the same problem where python 2 allowed it to work. But from what I've read, the "expected bytes, str found" error is a python 2 vs 3 thing. I'm not sure what Windows and macOS would be doing differently.

@corpnewt
Copy link
Owner

I'm not sure what Windows and macOS would be doing differently.

They shouldn't be doing anything differently, tbh - but I've seen Linux users have a myriad of issues with python scripts I've not seen before on other OSes. A quick search for plist.create_dict_plist points to plist.pyx which seems to be some component of libplist which is what is likely failing based on the error. When running python 3, my plist.py wrapper just forwards the .dumps() call to plistlib with no other translation, meaning it's likely outside the scope of this project.

-CorpNewt

@AnsonX10
Copy link
Author

Good enough for me

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

Successfully merging a pull request may close this issue.

2 participants