PyQt5 Converting .ui to .py file - pyqt5

I have trouble converting my .ui files to .py and the error message prompts out. Looked thru a few available sources on this site but to no avail. Anyone know what should I look out for?
C:\Users\SK\Desktop\ICT_project>C:\Users\SK\AppData\Local\Programs\Python\Python37\Lib\site-packages\PyQt5\pyuic5.bat -x Northspine.ui -o Northspine.py
File "C:\Users\SK\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\SK\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\SK\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\pyuic.py", line 26, in <module>
from PyQt5 import QtCore
ImportError: DLL load failed: The specified module could not be found.

Related

I am having issue to run my NLP model with JupyterLab on Google Cloud Platform

I am facing a problem running my model on GCP. Everything was working fine before and then one day I was not able to have access to my notebook anymore. I was obliged to create a new notebook and yesterday my tensorflow was disturbing (throwing many messages that I have used to seacrh on google), I followed some steps and my notebook start running and then stop again. When I try to run the notebook now, I get bellow error. I am using PyTorch for my code. Thanks
`
2022-11-01 09:42:23.409310: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-11-01 09:42:23.709259: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2022-11-01 09:42:24.904367: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64
2022-11-01 09:42:24.904473: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64
2022-11-01 09:42:24.904488: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 1063, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/opt/conda/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/conda/lib/python3.7/site-packages/transformers/data/__init__.py", line 30, in <module>
from .metrics import glue_compute_metrics, xnli_compute_metrics
File "/opt/conda/lib/python3.7/site-packages/transformers/data/metrics/__init__.py", line 22, in <module>
if is_sklearn_available():
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 524, in is_sklearn_available
return is_scipy_available() and importlib.util.find_spec("sklearn.metrics")
File "/opt/conda/lib/python3.7/importlib/util.py", line 94, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
File "/opt/conda/lib/python3.7/site-packages/sklearn/__init__.py", line 82, in <module>
from .base import clone
File "/opt/conda/lib/python3.7/site-packages/sklearn/base.py", line 17, in <module>
from .utils import _IS_32BIT
File "/opt/conda/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 28, in <module>
from .fixes import np_version, parse_version
File "/opt/conda/lib/python3.7/site-packages/sklearn/utils/fixes.py", line 20, in <module>
import scipy.stats
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/__init__.py", line 441, in <module>
from .stats import *
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/stats.py", line 43, in <module>
from . import distributions
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/distributions.py", line 8, in <module>
from ._distn_infrastructure import (rv_discrete, rv_continuous, rv_frozen)
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py", line 24, in <module>
from scipy import optimize
File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/__init__.py", line 400, in <module>
from .optimize import *
File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/optimize.py", line 36, in <module>
from ._numdiff import approx_derivative
File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/_numdiff.py", line 8, in <module>
from ._group_columns import group_dense, group_sparse
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /opt/conda/lib/python3.7/site-packages/scipy/optimize/_group_columns.cpython-37m-x86_64-linux-gnu.so)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "main.py", line 1, in <module>
from training import *
File "/home/jupyter/Ngambay-French-Neural-Machine-Translation-sba_fr_v1-/Baseline/training.py", line 13, in <module>
from transformers import (
File "<frozen importlib._bootstrap>", line 1032, in _handle_fromlist
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 1053, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 1068, in _get_module
) from e
RuntimeError: Failed to import transformers.data.data_collator because of the following error (look up to see its traceback):
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /opt/conda/lib/python3.7/site-packages/scipy/optimize/_group_columns.cpython-37m-x86_64-linux-gnu.so)
`
I have try to search on google but didn't find accurate answer for my problem. I am expecting some guidance to solve the problem.

Tensorboard error: Failed to launch TensorBoard (exited with 1). Contents of stderr:

Can someone help me with this error. I tried uninstalling Tensorflow Tensorboard and reinstalled still I am facing the issue.
ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
2021-05-29 16:11:25.794509: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
Traceback (most recent call last):
File "c:\users\shara\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\shara\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\shara\anaconda3\Scripts\tensorboard.exe\__main__.py", line 7, in <module>
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\main.py", line 46, in run_main
app.run(tensorboard.main, flags_parser=tensorboard.configure)
File "c:\users\shara\anaconda3\lib\site-packages\absl\app.py", line 300, in run
_run_main(main, args)
File "c:\users\shara\anaconda3\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 276, in main
return runner(self.flags) or 0
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 292, in _run_serve_subcommand
server = self._make_server()
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 472, in _make_server
deprecated_multiplexer,
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\backend\application.py", line 145, in TensorBoardWSGIApp
experimental_middlewares,
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\backend\application.py", line 253, in __init__
"Duplicate plugins for name %s" % plugin.plugin_name
ValueError: Duplicate plugins for name projector
It may be possible that you still have 2 versions of tensorboard installed.
Here is a script, which will check if there are some problems with your tensorboard and may give you some instructions on how to fix it:
https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
I would give it a try.

pyttsx3 not working on python 3.7 no module found

I am receiving the following error with the following code
import speech_recognition as sr
import pyttsx3
engine = pyttsx3.init()
engine.runAndWait
engine.say("Hello")
Traceback (most recent call last):
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\__init__.py",
line 20, in init
eng = _activeEngines[driverName]
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\weakref.py",
line 137, in \_\_getitem\_\_
o = self.data[key]()
KeyError: None
During the handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ProBook\Desktop\app1\APP.py", line 3, in <module>
engine = pyttsx3.init()
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\__init__.py",
line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\engine.py",
line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\driver.py",
line 50, in __init__
self._module = importlib.import_module(name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\drivers\sapi5.py",
line 3, in <module>
import win32com.client
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\win32com\__init__.py",
line 5, in <module>
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found.
Does anyone have a solution for this? I already tried installing and re-installing the packages as well as python several times
It looks like the default sapi5 engine is missing.
Try to explicitly specify the language engine.
pyttsx3.init("sapi5")
If the problem persists, try installing espeak and initializing the pyttsx with it.
More info there
Try the command python -m pip install --upgrade pip i had the same problem ..this will upgrade your pip packages ..it worked for me though
if pyttsx3 module not installed in your operating system just write these command on Anaconda Prompt or Python command
pip install pyttsx3==2.71 OR pip install -U pyttsx3==2.71

Cannot import name 'wrap_module'

Im setting up an odoo community server and after adding and removing an addon, i am getting an error.
I have tried copying the odoo addons files back to the default install ones with no success.
Exception in thread odoo.service.cron.cron0:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo/odoo/service/server.py", line 244, in target
self.cron_thread(i)
File "/opt/odoo/odoo/odoo/service/server.py", line 218, in cron_thread
from odoo.addons.base.ir.ir_cron import ir_cron
File "/opt/odoo/odoo/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/opt/odoo/odoo/odoo/addons/base/ir/__init__.py", line 8, in
<module>
from . import ir_actions
File "/opt/odoo/odoo/odoo/addons/base/ir/ir_actions.py", line 8, in
<module>
from odoo.tools import pycompat, wrap_module
ImportError: cannot import name 'wrap_module'
That is the error i am getting, ive tried using pip3 to install pycompat but it still dosnt work.
Make sure you running Odoo on python3,
on terminal python3 path_to_odoo/./odoo-bin
and clear the browser cache and try again.

Renaming the model Directory in Tensorflow

I renamed the model dir from /home/abcd/andrew_model_jul25_tif/ which contained model and summary directories to /home/abcd/andrew_model_sep22/ which contained the same two folders. When I ran the python script it gave me the following error:
Traceback (most recent call last):
File "eval_on_full_image.py", line 127, in <module>
tf.app.run()
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "eval_on_full_image.py", line 119, in main
do_eval_on_whole(model_dir, file, file[a:], output_dir)
File "eval_on_full_image.py", line 51, in do_eval_on_whole
saver.restore(sess,tf.train.latest_checkpoint(model_dir))
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1602, in latest_checkpoint
if file_io.get_matching_files(v2_path) or file_io.get_matching_files(
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 334, in get_matching_files
compat.as_bytes(single_filename), status)
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/abcd/virtualenvs/project/local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/abcd/andrew_model_jul25_tif/model
When I changed the folder's name back to andrew_model_jul25 the script worked. Can changing the folder's name have such an effect?
I'm using the 1.1.0 version of tf, and running it on a GPU.
The problem arises here:
saver.restore(sess,tf.train.latest_checkpoint(model_dir))
Try updating the name of your model_dir variable