How to solve : "No resource in resource descprition" in Pycharm? - python

I am trying to automatically convert Qt designer files with .ui extensions to .py file inPycharm using an external tool created with Pyrcc5.exe script. The arguments are:
$FileName$ -o $FileNameWithoutExtension$.py
After executing the .ui file with the external tool that I created I am getting this error:
The external tool named Pyuic and it's details are here:
I don't want to manually convert each .ui file into .py and then put it into the project directory. A solution to this error would be appreciated.

I have found a very simple solution to this.
Just replace the Pyrcc5.exe with Pyuic5.exe and the put the arguments as this:
-x $FileName$ -o $FileNameWithoutExtension$.py

Related

pyinstaller python file + exe in only one exe

py file in which I am executing a .exe file created in C++ (is inside a "data" folder)
Python Code:
os.system("data\\time.exe")
When I use the pyinstaller with the --onefile attribute I can't find a way for my program to compile the .py file + the "data" with another .exe inside.
Does anyone know how to convert my entire program into a single .exe? in which I can run my python program and also my .exe from C++ inside?
(I have tried to test with the .spec and with the --add-data attribute but I can't find a way that is compatible with what I want to do)
I look forward to your response,
Thanks you very much <3
There is a program called auto-py-to-exe which creates an exe out of your program without requiring you to create a setup file. The interface is great and allows you to easily create and exe without creating a setup.py. This also allows you to package your app as a single exe, without any other files. Below is a screenshot:
You can install the program by typing into the command line:
python -m pip install auto-py-to-exe
You can run it by typing in:
auto-py-to-exe
To see more about auto-py-to-exe, please visit the PyPI page at https://pypi.org/project/auto-py-to-exe/.

Converting python file to .exe using pyinstaller gives: This application failed to start because no Qt platform plugin could be initialized

I've created a program using PyQt5 for the user interface, when converting it to a .exe file with pyinstaller (using the line >pyinstaller --onefile -w --hidden-import=pkg_resources.py2_warn pitch_trainer.py) I get an executable, however when I try to run it I get the error message shown. I've looked for similar problems, however I can only find examples where the issue is with QT designer (e.g PyQt5 Designer is not working: This application failed to start because no Qt platform plugin could be initialized).
Update for the unlikely scenario that others are facing the same problem: I found two instances of the plugins folder on my device. One matched the one in the executable (contained qminimal.dll, qoffscreen.dll and qwindows.dll) whereas the other was slightly different, containing just qminimal.dll and qwindows.dll. I deleted the plugins in my executable folder and replaced it with a copy of the plugins folder at C:\Users\\AppData\Roaming\Python\Python37\site-packages\pyqt5_tools\Qt\plugins
This now works without issue, so I guess pyinstaller must have picked out the incorrect (or corrupted) files to build the executable with.

How to convert .py script and .ui file with images to .exe

I wrote a program in Python that includes external files, including images and a GUI .ui file.
I want to convert the Python script to a single executable (.exe) file using PyInstaller. When I try to open the .exe file, the program does not open.
You will need more information on why the application is closing immediately in order to solve your problem. To view the error messages associated with running your executable, run the .exe file from the command prompt: /path/to/app/dist/MyApp.exe. This will allow you to observe any errors that may exist after the app was bundled. If the program fails during an import statement, you may need to add a package to the hiddenimports list in the .spec file. Check the PyInstaller documentation for instructions on modifying the .spec file.

PyQt5 file missing (PyQt noob)

I have a study assignment due that requires me to convert a *.ui file from Qt into a *.py file using the command prompt.
However I have been struggling because I can not find the Pyuic5/4 module used to convert a *.ui file into a *.py file.
{I have literally dug through and searched for it in my drive and can not find it}
I have the mots recent Qt and Python download and running well.
Any help or alternative method to converting *.ui to *.py would really be appreciated!
Try to run pip install pyuic5-tool in your terminal.

Running .py files

I have .ui, .py and .pyc files generated. Now, when I edit the .py file, how will it reflect changes in the .ui file? How do I connect .the ui and .py files together as QT designer allows only .ui files for running purposes?
Don't edit the generated .py file. Create another .py file for the Python code you need to write. This module should load the UI. This would also be the module to run, if these are the only files in the project. See a tutorial from here: http://diotavelli.net/PyQtWiki/Tutorials
the .py file generated from pyuic is not supposed to be edited by the user, best way it is intended to use is to subclass the class in .py file into your own class and do the necessary changes in your class..

Categories

Resources