Closed chiyakiha closed 2 years ago
Thank you for opening this issue, I wasn't aware of this until very recently.
So, first off:
Traceback (most recent call last):
File "main.py", line 5, in <module>
ModuleNotFoundError: No module named 'src.util.missing_dep'
[38048] Failed to execute script 'main' due to unhandled exception!
This was caused by a conflict with main files; I accidentally overwrote the main.py
file on the releases-source
branch with a modified file from the main
branch. In the main branch, the main.py
ensures that the user has installed all the necessary dependencies, and prompts them if not. This is because, if ran as a regular python script, and not from a binary, there is a chance of the user not installing all required dependencies.
^ Fixed in 81cd3c7
Next issue:
Package "requests" is not installed!
Package "dicttoxml" is not installed!
Package "distro" is not installed!
Package "xmltodict" is not installed!
Package "wmi" is not installed!
Package "pywin32" is not installed!
Do you wish to install the aforementioned missing packages? [y/n]: n
Exited successfully.
Traceback (most recent call last):
File "main.py", line 22, in <module>
File "util\missing_dep.py", line 52, in install_reqs
NameError: name 'exit' is not defined
[27728] Failed to execute script 'main' due to unhandled exception!
This could possibly be a mere Python interpreter bug? If you're running the script via: python /path/to/OCSysInfo/main.py
- it should work properly. However, I've ran across this issue when using pyinstaller (I will assume that you've also used this), the origin of this issue is foreign to me, however, I have found a solution: merely import the exit
function from the sys
package.
^ Should be fixed in f4d9f3d5 (at least for binary releases)
I've also made a new binary release, if you wish to test that. All the aforementioned bugs should be fixed.
CC: Releases
This was caused by a conflict with main files; I accidentally overwrote the
main.py
file on thereleases-source
branch with a modified file from themain
branch.
I did not notice the releases-source
branch when looking, so the conflict between it and main
does make sense on that front.
This is because, if ran as a regular python script, and not from a binary, there is a chance of the user not installing all required dependencies.
Right, this case is what initially made me believe that the binary release wasn't configured properly (I work with .NET mainly, which allows for Release/Debug configurations by default)
However, I've ran across this issue when using pyinstaller (I will assume that you've also used this), the origin of this issue is foreign to me
I had made use of the Build Windows binaries
portion of .github/workflows/release.yml
to build to a binary, not run directly from the code, particularly the lines below:
https://github.com/kernelBPD/OCSysInfo/blob/bd74915b54c4eca3b9b9cd99b095c2449efc8845/.github/workflows/release.yml#L56-L63
My build log (Command Prompt, PyCharm Community 2022.1 EAP) is listed below. Perhaps your build process on Actions may differ from what I'm doing on my side.
I've also made a new binary release, if you wish to test that. All the aforementioned bugs should be fixed.
Testing binary release 1.0.3
, it appears to be working normally. Since the main issue appears to be fixed now, I'll go ahead and close this. Thanks for your time!
The application appears to be failing to open due to dependency-related issues, which I have been able to replicate on two devices (both running Windows 11) with version 1.0.2 (versions 1.0.0 and 1.0.1 can launch properly on both devices).
The two failures appear to be originating from the
src\util\missing_dep.py
file (it's not fully clear to me if there may be something going on elsewhere). The error on 1.0.2 (from Releases) statesand an error from a self-built executable (built from bd74915b54c4eca3b9b9cd99b095c2449efc8845) stating
I have self-built the application using the same configuration used in Actions (Build Windows binaries), shown below: https://github.com/kernelBPD/OCSysInfo/blob/bd74915b54c4eca3b9b9cd99b095c2449efc8845/.github/workflows/release.yml#L59-L63
*I am able to run/debug
main.py
via PyCharm, building fromorigin/main
(commit at this time bd74915b54c4eca3b9b9cd99b095c2449efc8845). I believe there may be an issue with the release pipeline that is causing this issue to occur.If any more information is required, I will provide it in this thread.