-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
ModuleNotFoundError: No module named 'winrt.windows.foundation.collections' #198
Comments
I just had the same issue. Checking out the code and running a dev build works fine, but I think I installed winrt.windows.foundation.collections before testing. Even with it uninstalled I can't reproduce on the dev copy but it might be lingering in Windows somehow. I suspect that the github build config needs to install this package prior to building the pyinstaller executables. E.g. add PineSAM/.github/workflows/build.yml Line 115 in 4817ef3
Then a build would have to be triggered and the artefacts checked to see if the module gets baked in. I haven't messed around with github workflows recently so I don't know how to test that easily. |
After much messing around, I think the problem lies on the builder hosts: https://github.com/builder555/PineSAM/actions/runs/6960669786/job/18940658644#step:6:78
There's some potential solutions to the problem here: https://stackoverflow.com/questions/48712154/pyinstaller-warning-lib-not-found I'll try these out on my fork at some point. I also ran into this issue while building locally: pyinstaller/pyinstaller#8075 |
Also tried just about everything. |
if you can create a PR, that'd be great, i don't have easy access to a windows machine and testing in gh actions is extremely slow in my experience. |
Too right. I gave it a go on my GitHub fork but I'm at a bit of a loss on how to get this working properly. I think the issue must be some kind of caching issue with GH actions. The workers seem to have the WinRT python DLLs (in I've just opened an issue on the winrt-api tracker. Hopefully there's a simple way to make this work correctly. I'll wait on a response there to see if we can get this built correctly before checking if the version.txt path issue really needs fixing. |
@SilverKnightVGM I got a hold of a windows VM so I was able to test some stuff, I also redesigned quite a bit of architecture. Give it a try: https://github.com/builder555/PineSAM/releases/tag/v2.1.14 |
So this does work, but there are a few hoops to go through: First, Windows defender picks up the exe as an instance of Trojan:Win32/Wacatac.B!ml Second, the Third, I can only get this to work using the hostname for the URL. 'localhost' and 127.0.0.1 don't seem to work, I just get a connection reset message in the browser with no corresponding log output. In any case, the ModuleNotFoundError has gone away, so that's progress. I wonder if the GH actions caches have changed or if the build runs differently now due to configuration changes. The two issues I opened with the winrt-api got assignees two weeks ago, but no comments as of yet. winrt-api#2440 is the most relevant. |
I saw that Trojan alert as well, I thought it was just some glitch on my machine. I mean you can try building it locally using ci/build.ps1 should get the same result. Thanks for the link, I'll submit my report there as well. I'll look into adding self-signed certificate for the script, not sure if it'll help with the policy issue. I had to do As for url, I just tried in edge, brave, and firefox, all worked with http://localhost:8080 and http://127.0.0.1:8080. Which browser are you using? I updated the build script with UPDATE: I looked into it, self-signed certificates are basically useless - the same error will pop up. But on a fresh windows 10 installation latest release (v2.1.15) of Pinesam.exe started without issues (running it directly). The only downside is it doesn't automatically open a browser window. |
@brookst I got a reply from Microsoft, seems like they added pinesam to their exceptions and what not, so the trojan error should disappear. With that the urls now should work. So let me know if running Pinesam.exe directly and opening localhost:8080 manually is a feasible strategy. |
Ah good. My submission came back as "We cannot reproduce any detection on the file." I added an exception to Windows defender to test it, so I'm not sure if I can now check that it passes. I can't seem to reproduce the hostname issue. It looks like Process Explorer was resolving hostnames so even if it was bound to 0.0.0.0 as expected, it would be reported as the system hostname. That doesn't explain why nothing would actually connect on localhost and 127.0.0.1. The problem came and went a few times without me figuring out a pattern so I don't think I can track it down. If the problem re-occurs I'll look into it and open another issue, but things seem to be working ok for now. The only remaining annoyance is having to allow the shellscript to run. I wonder if the binary could launch the browser itself, since that's the only real purpose of the script. Maybe a flag could skip that if users don't want that behaviour. |
Yeah,I'm sure it can be done from inside python. I'll dig into ti |
Ah, I also meant to point out that the logs still show the error, but it doesn't occur on my system anymore. See line 87 in the build step here: https://github.com/builder555/PineSAM/actions/runs/7686744109/job/20945954171#step:6:88 I'm also not sure what to make of that. |
no idea, i'm really not a specialist in windows. from a brief search, the suggestion is basically to find that dll and copy it manually. |
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
The server pairs with the Pinecil V2 without errors and can be controlled with the web frontend.
Actual behaviour
The server never pairs with the PInecil and the frontend can't be used, even though it shows up just fine. The console shows the following error over and over:
Specs:
Additional context
Tried (and failed) to run on two separate Windows 10 laptops. I did also later try to pair the Pinecil manually to the PC via Bluetooth, and it paired just fine.
The text was updated successfully, but these errors were encountered: