pyuic error when converting .py from .ui - qt

i'm fairly new to PyQt but not totally new to Python.
I'm trying to develop a GUI using PyQt5 and Python 3.4. I was creating the interface with Qt and wanted to have an early draft of the Python script.
To do that i used this command :
pyuic5 -x filename.ui -o filename.py
and it worked just fine.
But, after adding more objects in my GUI, it was not possible to create the .py file. An error occurs in the cmd and the .py created lacks the def retranslateUi and the __name__ == "__main__" parts.
I would have put a printscreen of the error message but i'm not allowed yet.
The message says :
An unexpected error occured.
Check that you are using the latest version of PyQt5 and send an error
report including the following information:
your version of PyQt (5.4.1)
the UI file that caused the error
the debug output of pyuic5 (use the -d flag when calling pyuic5)
If anyone can enligthen me, that would be great!!

Related

'cfgrib' is not showing in xarray engine list, when the python code is packaged with pyinstaller to get exe file

I am trying to create an executable file from python code with 'Pyinstaller' package. The code runs in conda environment where the cfgrib selfcheck is good:
Found: eccodes v2.27.0.
your system is ready
However when the executable created by pyinstaller runs, the error is:
ValueError: unrecognized engine cfgrib must be one of: ['scipy','store']
I adde 'eccodes', 'python-eccodes', 'cfgrib', 'netcdf4' to the hidden imports, but no success. Does anybody have any idea to fix this issue!

pyinstaller unable to fetch required module

I am trying to make a file uploader using pcloud. While doing so when I run my python code from Pycharm, it works perfectly fine. But when I convert it into exe using pyinstaller, it gives me "fatal error - failed to execute script"
here's my code
from pcloud import PyCloud
pc = PyCloud('myemail', 'mypassword')
print('connected !')
exact command used in pyinstaller was "pyinstaller --onefile myfile.py"
read about hidden imports, but dont know how to exactly add the module pcloud in my exe.
Any help would be appreciated !

Configuring Qt 5.9.5 on Ubuntu 16.04

I recently started working with Qt. I was trying some simple widgets. It was working as intended with no errors and suddenly Qt doesn't work anymore. I did not change any configuration/settings. I restarted my computer and I started to get the following error. I have no idea how to fix them.
Error (when trying to open an already existing project):
/Qt/5.9.5/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
Project ERROR: Library '' is not defined.
Warnings while parsing QML type information of Qt/5.9.5/gcc_64/qml:
/Qt/5.9.5/gcc_64/qml/builtins.qmltypes:1:24: Reading only version 1.1 parts.
/Qt/5.9.5/gcc_64/qml/builtins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
/Qt/5.9.5/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
Project ERROR: Library '' is not defined.
/Qt/5.9.5/gcc_64/mkspecs/features/toolchain.prf(69): system(execute) requires one or two arguments.
Project ERROR: Cannot run compiler 'g++'. Output:
===================
===================
Error (when trying to create a new project)
Maybe you forgot to setup the environment?
Error while parsing file /workspace/testQt/testQt.pro. Giving up.
/Qt/5.9.5/gcc_64/mkspecs/features/toolchain.prf(69): system(execute) requires one or two arguments.
Project ERROR: Cannot run compiler 'g++'. Output:
===================
===================
Other details:
Qt version: Qt 5.9.5(gcc_64)
Compilier: GCC 7.3.0
OS: Ubuntu 16.04.4 LTS
PS: I had this same error two days back. Reinstalling Qt fixed it but not anymore.
There is no problem with g++. I complied a code with the same complier (used here) through terminal and it works perfectly.
Thank you.
I had the same problem, and I solved it by upgrading QtCreator. I think, 3.x.x versions of QtCreator incorrectly assumes the name of g++ compiler. In Kits options there is only "Compiler" setting, and in 4.x.x there are two separate string "C" and "C++". After indicating correct paths to both compiles "Cannot run compiler" error disappears.

Getting install_pyuic5 error during PyQt5 install

I have built source files for installing PyQt5 but when I executed sudo make install, after a while, it prompts this error message:
sudo make install
.
.
.
install -m 755 -p /home/bora/Desktop/PyQt-gpl-5.4.1/pyuic5 /usr/bin/
strip /usr/bin/pyuic5
strip:/usr/bin/pyuic5: File format not recognized
make: [install_pyuic5] Error 1 (ignored)
How can I fix this problem? I am using Qt 5.4.1 and I am sure that I have properly set the path to Qt5's qmake. If I didn't, it would gave me an error during compilation of source files. Do I need to install any dependecy for PyQt5 another than SIP?
I incurred in the same problem after following this link:
https://michalcodes4life.wordpress.com/2014/03/16/pyqt5-python-3-3-in-virtualenv-on-ubuntu/, I managed to narrow the errors down to the one you're reporting.
Notice in the link where it mentions to run configure.py with the -verboseflag:
python configure.py -verbose --qmake /path/to/Qt/5.2.1/gcc_64/bin/qmake --sip-incdir=/usr/include/python3.3m
Go through the stacktrace and see if the error you reported is the only one. If that is so then ignore it as it's just a "warning" in Python parlance. In your command line enter:
import sip
import PyQt5
should give no errors.
It's not really an error, so you can safely ignore it (just as make did).
The output is coming from the strip command, which is mainly used for removing debugging symbols from binaries. However, /usr/bin/pyuic5 is a shell-script rather than a binary, and so strip cannot process that file. As a consequence, it outputs a warning message and returns a non-zero exit status. The make process sees this, but has been configured to ignore it, and so there is no fatal error.

Error in browser: The application unexpectedly exited. Diagnostic information has been dumped to JavaScript error console while using shiny-server

I'm trying to deploy a shiny web app on shiny-server. But everytime it gives the error :
"The application unexpectedly exited. Diagnostic information has been dumped to JavaScript error console"
The error shown in the error console is as follows:
"Listening on http://127.0.0.1:58865
Error in library(htmlwidgets) : there is no package called ‘htmlwidgets’".
I have installed the package 'htmlwidgets' on my machine. Still it always shows the error. the application works file in Rstudio but it is giving this error on browser when I run it on Shiny-server. Please suggest a solution.
Thanks.
Please read http://rstudio.github.io/shiny-server/latest/#run_as In particular, please note this:
For one, the paths in which R will look for packages (.libPaths()) are often user-dependent.
One way to solve the problem is, just like how you installed shiny, you may also install htmlwidgets to system-wide library paths, e.g.
sudo su - \
-c "R -e \"install.packages('htmlwidgets', repos='http://cran.rstudio.com/')\""

Resources