Closed CongaTom closed 1 year ago
Hi @CongaTom - I'm sorry you're having issues running the program! I've seen other error reports showing the same error (the "object cannot be interpreted" error) from other people, but I haven't seen it in my own testing. I think I understand where it's coming from though - give me a little time to check into it and I'll post an update that will (hopefully) fix that. Everything else you've done looks good, you have PySide2 and the program isn't reporting that it's missing, although I don't know if you needed to update to zsh, I use the default Mac OS X terminal when I run it on my system.
Thanks for that. I only updated to zsh because a message in terminal recommended that I do it. :-)
Ah, ha, I stand corrected - I just looked at my Terminal and saw it also was using zsh, so that answers that 😄 OK, I tweaked the setAlignment flags to hopefully correct the "can not be interpreted" issue, but I haven't added those changes into the main branch yet. Try this version out to see if you still get that error -
https://codeload.github.com/taburineagle/NeewerLite-Python/zip/refs/heads/setAlignment-WIP
Hi @taburineagle
I'm not sure whether I can just delete the previous folder with all the filers in it,or whether i need to uninstall it somehow. So if you could please advise on that that would be great. So I downloaded the next version of the file that you posted above, put it into Applications folder and first I ran NeewerLite-Python.py, and 4 windows came up:
I pressed Launched New Instance and nothing happened....Or maybe the windows above became as they were above at that point. Anyway, nothing else happened.
So then I ran ui_NeewerLightUI.py and this happened:
So, no luck with the modification I think..
Actually, when I pressed Launch New Instance, this one came up:
Ah, I could see how that would have been confusing, sorry about that - yeah, you can delete the old version of NeewerLite-Python you downloaded and just use the version in the .zip file I specified, although I think I may have figured out the actual problem. If what I think is the actual problem is, I don't know why the compiler didn't tell me there was an issue before (the program has run fine on all of the platforms I've tested it with - so either they're ignoring the issue at hand or the version of PySide2 I'm using is strangely wired.) I think I need to use PySide2.QtCore.Qt and not PySide2.QtGUI.Qt - let me do some testing on that (I don't have my laptop with me at the moment, so I can't test that right now), and I'll get back to you.
OK @CongaTom - I've made the import changes on my end and pushed the commit to the main branch. Try this version out and see if you have the same "cannot be interpreted" error. You can delete the NeewerLite-Python-setAlignment-WIP folder and use the scripts from this zip file:
https://github.com/taburineagle/NeewerLite-Python/archive/refs/heads/main.zip
Hi @taburineagle
Sad to say I think the same problem exists.... But do you find it strange that the Python app is showing two icons?
After "Launch New Instance":
2 icons running for the same app??
Huh - I'm not sure why that error keeps popping up, nothing's being converted to an integer in that parameter at all 🤔 The two icons kind of make sense - I'm assuming the first one is running the initial copy, and the 2nd one is running the version you're telling to "ignore" the first copy, but that error still confuses me. I also wish I had a test setup that would replicate the results so I could find it more thoroughly, but I've never seen that error myself in any of my testing, on Windows, Mac or Linux... yet I've had multiple reports of it happening on some installs. Let me do a bit more investigating...
OK, if you type
pip show PySide2
In the terminal, what version does it show you're running? I'm wondering if there might be a discrepancy in versions - possibly... I'm using 5.15.2.1, and in doing some Google searches, I have seen a few entries talking about errors with PySide2 and Python 3.8, but I'm not sure how far that goes back.
https://codereview.qt-project.org/c/pyside/pyside-setup/+/288381/5
I'm not sure what you mean by the "initial copy", because what i do is I quit both Python and Terminal, so nothing is running, then I run your latest version (atm it's NeewerLite-Python.py). And it just creates 2 icons, and tells me that "another instance .. is already running". But I only opened it once. When I press on one Python icon, it shows the Preferences window. When I press on the other Python icon it shows the "Another Instance..." message window.
Here's what happened when I typed in pip show PySide2:
maybe i've installed it wrong, or I've duplicated something? I know that it didn't behave like I thought it would and I tried once or twice to install things...
Sorry for the late reply @CongaTom, last week turned out to be a lot busier than anticipated! Ah, actually I think you do have an older version of PySide2 - the latest version is 5.15.2.1, the tech note I mentioned (that has the integer issue) says it's from 5.14, and you have 5.13 installed (according to the pip show PySide2
command readout in your screenshot, it says 5.13.2), but I'm still not sure why the older versions of PySide considered those variables as integers in the first place as they definitely aren't. OK, next step, try this and see if pip
will allow you to upgrade your version of PySide2:
pip install --upgrade PySide2
If not, let me see if I can create a virtual machine/venv to test with using the old version to see if I can work out the strange integer/hex conversions that are going on there. As far as the "initial copy" I'm talking about, when you run NeewerLite-Python first, it doesn't quite get to the GUI (due to the integer issue with PySide2), but it does get far enough in the code to generate the "lock" file that shows future launches of the program that it was started at some point in the past. So when you launch it again, even though the integer issue still doesn't let it launch the whole way, the next launch finds that "lock" file and alerts you that you may have another copy running, hence the "There is another instance of..." dialog.
Looks like I can't upgrade any further? I'm using Mac OS Monterey version 12.6.3 on a MacBook Pro (15-inch, 2016)
Ah, that's interesting @CongaTom - it might be because you installed Python with Homebrew, but I'm not sure... But! - I think I've figured the problem out. I was able to get a venv session set up with the older version of PySide2 and I also got the same error, so to fix it, I changed the method for combining Alignment flags for all versions of PySide2. The GUI should launch correctly now, I tested it with PySide2 5.13.2, and everything loads correctly for me now.
Here is the new version - https://codeload.github.com/taburineagle/NeewerLite-Python/zip/refs/heads/main
Ok. It's either getting MUCH closer, or, this could be it! This will take a bit of reporting... I downloaded the zip file, put it into my Applications folder, and unzipped. I made sure both Terminal and Python were Quit. I ran NeewerLite-Python.py It came up with these 4 windows, and another window asking me if I wanted it to use Bluetooth (or some words similar to that) I pressed Yes and it went away. The 2 iterations of Python icon still come up in the dock.
I think that's a great step forward!
I quit them all totally, and repeated the same procedure. And got these 4 windows:
I quit them all totally and ran ui_NeewerLightUI.py, and got these windows:
So, does everything work now? If so, what is ui_NeewerLightUI.py used for? What do I do with it?
That's it! The errors you got in the first set of screenshots just tell you Bluetooth is turned off - NeewerLite-Python needs Bluetooth turned on, because that's how it communicates with the lights. ui_NeewerLightUI.py
on its own is just the GUI (the main window) - launching it on its own won't do anything, it's just a file that NeewerLite-Python.py
uses to draw the window you interact with when you use GUI mode.
Yes! You did it!They work! I can control the lights through this window! Thanks so much! Now my next question regards how to connect it to Stream Deck. So I'll create a new issue because I think there's another subject about to happen.... Oh, but before I do, how do you quit running the program?
Ah, excellent! I'm going to close this one then, because the GUI does work, and I'll head on over to the other one.
Hi
This has been a big learning curve for me. I've never used the Terminal before for anything. And I've never used GitHub.
My goal is to control my Neewer lights from Streamdeck.
But I'm having problems running the 2 .py programs.
I'm using MacOS Monterey 12.6.3. I upgraded my terminal to zsh
I tried uploading Pyside2 and Python3 but got confused about PATH, so I uninstalled them. I think. I then used Homebrew and uploaded Python3 and Pyside2. QT5 failed during that, so I uploaded it separately.
I downloaded the .zip file and unzipped it and moved it to Applications folder.
I tried to run NeewerLite-Python.py on the terminal but it said I didn't have PySide2 Python library installed. So I typed in "pip3 install PySide2" in the terminal.
Now when I first run the UI .py program by right clicking and choosing Python3 Launcher app it comes up with this screenshot of the Terminal. Then when I run the other .py program by right clicking and choosing Python3 Launcher app it says "it's already running, but would you like to run it anyway?". I click Yes, and it comes up with this other screenshot.
I've done as much research as I possibly could. I don't know what to do next.