athrvvvv / AppOpener

Python library to open/close applications in windows.
https://appopener.readthedocs.io/en/latest/
MIT License
18 stars 7 forks source link

TypeError: the JSON object must be str, bytes or bytearray, not NoneType #9

Closed OWO99 closed 1 year ago

OWO99 commented 1 year ago

""" File "C:\Users\dingj\Desktop\testtt\new\main.py", line 5, in from AppOpener import open File "C:\Users\dingj\Desktop\testtt\new\venv\Lib\site-packages\AppOpener__init.py", line 7, in check.check_json() File "C:\Users\dingj\Desktop\testtt\new\venv\Lib\site-packages\AppOpener\check.py", line 63, in check_json create_file() File "C:\Users\dingj\Desktop\testtt\new\venv\Lib\site-packages\AppOpener\check.py", line 53, in create_file apps = json.loads(result.stdout) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\dingj\AppData\Local\Programs\Python\Python311\Lib\json\init__.py", line 339, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType

Process finished with exit code 1 """ Using pycharm

OWO99 commented 1 year ago

and also when I want to run "python setup.py sdist bdist_wheel" it shows "error: invalid command 'bdist_wheel'"..please help

athrvvvv commented 1 year ago

Actually, I would love to solve this but my exams are going on so I'll fix it later. Promise.

athrvvvv commented 1 year ago

@OWO99 AppOpener only works on windows

OWO99 commented 1 year ago

@OWO99 AppOpener only works on windows

YES I'm using windows

athrvvvv commented 1 year ago

This will be fixed, with AppOpener v1.7 releasing on 10th Of March

athrvvvv commented 1 year ago

@OWO99 are you using Windows XP or Windows 7 or Windows 10?

Note: AppOpener won't run on XP and 7

OWO99 commented 1 year ago

@OWO99 are you using Windows XP or Windows 7 or Windows 10?

Note: AppOpener won't run on XP and 7 Windows 10 of course, I will try new version later, Thanks a lot!

mhanuel26 commented 1 year ago

@athrvvvv Hi, I am facing same issue at the moment, is your fix something you already might have there or still a work in progress? Thanks.

athrvvvv commented 1 year ago

@athrvvvv Hi, I am facing same issue at the moment, is your fix something you already might have there or still a work in progress? Thanks.

I will inform you, about this matter.

codingbro163 commented 1 year ago

For anyone who's still having this issue - I managed to solve it by firstly installing the 1.3 version of the library and only then installing the newest version (or any version I guess). I am not completely sure whether you have to run a code, where you do "import AppOpener" before installing a different version, but if it doesn't work without it - then it will if you do this.

From the looks of it there is something in the 1.3 version that isn't in any of the others... @athrvvvv

athrvvvv commented 1 year ago

Relax guys, releasing AppOpener v1.7 this month!! which solves #15 #9 #10 🤝😊

athrvvvv commented 1 year ago

AppOpener v1.7 just released!! ✌️

Install AppOpener v1.7:

pip install AppOpener==1.7

I have added an Exception, if the File creation process failed, it will create files using the old method in AppOpener v1.3 Hope soo, this works!! Btw, thanks @codingbro163 for suggesting the solution 🤝👍 If your Issue is fixed, you may close this now 😊

Lots of love, athrv ❤️