xkbcommon: ERROR: failed to add default include path - python

Whenever I start a python script that tries to access the keyboard, for example, with OpenCV's waitKey() method, I get the following error:
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
This error started to appear when I installed the keyboard library (or pynput, I am not quite sure) and persisted after I uninstalled them. I do not have QT installed.
Also, neither OpenCV's waitKey nor the two installed libraries can detect any key events (I suspect this is connected), which was already the case before I got the error though.
I am running on Ubuntu 18.04.
How can I go about this problem?

I think this recent issue was resolved here:
https://github.com/conda-forge/qt-feedstock/issues/104
I think the solution is
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
but I'm not an expert... somebody back me up here please.

Related

Process finished with exit code -805306369 (0xCFFFFFFF) [duplicate]

I'm running a python script and it used to work (it even does on my other laptop right now) but not on my current computer - I just get the error code:
Process finished with exit code -1073741515 (0xC0000135)
I don't get any other results - not even from "print" commands at the beginning of the file.
I haven't found anything specific to that.
I re-installed python (2.7.9), pygame (1.9.1) and even pycharm (tried 4.5 first, now with 5.0 - same result)
Does anyone know what that error code means? I couldn't find anything about it.
reinstall python – you don't have python33.dll in c:\WINDOWS\system32\
Maybe you have different python versions – look at folders in root of c:
If yes, then point to your version of python.exe in pyCharm > Settings > Project Interpreter
This may be due to another program locking that memory location.
Before you try more drastic measures, know that restarting the computer fixed the problem for me.
The error seems to be related to issues in native code (e.g. C/C++) and might be related to issues in loading some dll file. To know which file, the Windows "Event Viewer" is your friend.
The "Event Viewer" -> "Windows Logs" -> "Application" feed usually shows one or more rows for each crashed application and one of them should list the problematic filename.
Personally I observed similar issue with matplotlib on Python 3.9 (installed using Anaconda on Windows 10). I could see this kind of error when the code was executed using PyCharm. The same code just crashed with no visible errors when starting from Anaconda console.
The Event viewer then showed issue with freetype.dll. In this case, the problem was fixed by downgrading the packege from 2.11.0 to 2.10.4:
conda install freetype=2.10.4
Depending on the exact issue, I could imagine that removing pycache folder might help (like mentioned in other answers). Also, sometimes it might make sense to look at the PATH environment variable to actually understand why certain dll file is loaded from such a location.
I got this error in PyCharm after upgrading pyarrow to the most recent version -- 0.16 --- using pip, running the same code I had ran before this update which used pandas read_parquet specifying the engine="pyarrow" triggering use of this library. After uninstalling and installing the previous version with
pip install pyarrow=="0.15"
the problem resolved.
I encountered the same error when running .py in PyCharm on Windows. Inspired by https://thenewboston.com/forum/topic.php?id=10088, I uninstalled and reinstalled Python. When reinstalling, I checked the ADD PYTHON TO THE PATH Option. After recreating the virtual environment in PyCharm, the error was gone.
Update: On another Windows PC (64-bit), I encountered the same error where reinstalling Python was not enough. I tried two things.
Uninstalling 32-bit Python and installing 64-bit Python. Namely downloading python-3.6.4-amd64.exe instead of python-3.6.4.exe
Recreating the Pycharm project from github.
Between the two actions, the error was gone.
taskkill /F /IM python.exe
Try this if it just happened out of the bloom and it worked normally before that error occurred.
I solved it by disabling "PyQt compatible" checkbox in the Settings under Build, Execution, Deployment --> Python Debugger.
After that, it should debug properly.
Here is caused it and solution:
The computer had two physical processors. The code uses Numba for parallel computations. Upon disabling and re-enabling hyperthreading this issue started. To solve it clear pycache folder and run the program.
I encountered this error in my code as well, in my case the problem was sharing pickle which produced in Unix machine one a Windows one.
**I faced the same situation and the malfunction stems from trying to run both terminal processor and graphical user interfaces. When I clicked the button program stopped running **
Solution: I disabled terminal inputs and work with graphics.
For example:
if you do this
entry1=Entry(root,width=10).pack()
variable= str(input("Whats your name?"))
You will see the error.
if you delete either entry1 or variable, you will not see the problem.
If you're trying create a .svm use dlib probably the problem is in .xml, some image that you use is cause the problem. Try to create a new .xml putting out a image(any image) or remove that your .xml and test, try this even you find out the image problem.
For exemple, the image "treinamento3.jpg" was the problem. I removed this command line:
< image file='delirium\treinamento3.jpg'>
< box top='213' left='86' width='46' height='49'/ >
< box top='531' left='47' width='125' height='123'/ >
< /image >
from my .xml for solve my problem.

Cannot find module "qfi" for running JdeRobot drone_cat_mouse exercise from source

I want to run JdeRobot drone_cat_mouse on my Ubuntu 20.04. I'm using ROS Noetic and has faithfully followed these installation instructions. Everything it told me to test was working properly.
When I first ran roslaunch drone_cat_mouse.launch, there was an import error for teleopWidget and sensorsWidget which I fixed by using relative imports. Then I had an error No module named qfi.
Unlike teleopWidget and sensorsWidget, I couldn't find the qfi module in the JdeRobot/drones source code. So I googled it, and the only relevant result that popped up was this, which led to this link. They said to:
sudo touch /usr/lib/python2.7/dist-packages/qfi/__init__.py
But I ran that command and this happened!
Not even pip has a "qfi" module!
So I thought to check JdeRobot's entire repository. Turns out it was in JdeRobot/base, and that repo is not maintained anymore!
After further digging, there was this issue which basically tells us forget about it and move to the web release! But I can't, circumstances forced me to use the source code option (deliverables are drone_cat_mouse.world and my_solution.py, it's impossible for me to get the former in the docker web version and the latter's format is different between the source code version and the web version).
In a nutshell, how do I fix this qfi module problem so that I can run the exercises from source like these people?
I'm just stupid, as usual. all I need to do was clone https://github.com/JdeRobot/ThirdParty, get the qfi module, copy it to
~/catkin_ws/src/drones/rqt_drone_teleop/src/rqt_vel_teleop/ and replace all qfi imports with its relative import version. All common sense
No errors in terminal, gazebo runs, but somehow the rqt widget for drone vision never appears.
Forget it, I'm giving up on this dumpster fire of a program.
Edit: I did another fresh install, followed the steps, noticed troubleshooting for qfi which required qmake, but same end result
If you're trying to launch drone_cat_mouse there is an issue with the namespace of the RQT widget that occurs when you try to launch it.
Namely, the topics that exist for drone_cat_mouse are prefixed by cat/ or mouse/. But RQT will try to access these topics without the prefix and run into an error. Alternatively, since you have a local install, you can try to run the code manually by running
python my_solution.py
Just make sure the change the area where the DroneWrapper class was called in the following manner:
HAL = DroneWrapper('drone', 'cat/')
Here 'drone' is the name of the node you are creating and 'cat/' is the namespace given to the DroneWrapper Class.

The ordinal 242 could not be located in the dynamic link library Anaconda3\Library\bin\mkl_intel_thread.dll

I have just installed Anaconda 5.3 64-bit (Anaconda3-5.3.0-Windows-x86_64) on Windows 10 and am getting this error when trying to run Spyder.
pythonw.exe - Ordinal Not Found
The ordinal could not be located in the dynamic link library C:\Users\username\Anaconda3\Library\bin\mkl_intel_thread.dll.
I used Dependency Walker to view the functions in the DLL and see that ordinal 242 is there. The function associated with ordinal 242 is mkl_blas_zherk.
Could anyone help me fix this or direct me to a resource to help me figure it out myself?
The quick answer:
set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
I set a user environment variable for this.
The official answer is here.
If you are running Python/IPython from a console, check the priority of libiomp5md.dll using where, i.e.:
where libiomp5md.dll
This may show a few absolute paths (one per line) to different libiomp5md.dll files. A healthy setup should list Anaconda's at the top (e.g. C:\ProgramData\Anaconda3\Library\bin\libiomp5md.dll), and if there are any others listed below, they can be ignored as they have lower priority.
However, if you see a different libiomp5md.dll path at the top, then this will be loaded first, and may conflict with Anaconda's DLLs. If this file is in the current directory, then either change directory to a folder without this file, or (if possible) delete or rename the conflicting DLL file. If it's in a different folder, then you may need to re-arrange your PATH variable to move Anaconda's before other paths.
This is not a proper answer, but for me (having the exact same problem) a workaround was to downgrade "anaconda" to 5.2.0 with the Anaconda Navigator. If that works for you, too, you could start upgrading individual packages to see when the error reappears. Maybe it is a bug in one of the packages, not a problem with our systems.
Edit: Here are some links to similar or related discussions:
entry point mkl_blas_dgem2vu could not be located
https://github.com/spyder-ide/spyder/issues/7357
More edit:
It also helped me to find the following files in "C:\Windows\System32" and rename them (I just appended "_renamed" to the file name).
mkl_core.dll
mkl_def.dll
mkl_intel_thread.dll
If I understand correctly, Python will use those instead of the ones in the Anaconda folder, which can cause problems.
['System32\libiomp5md.dll', 'System32\mkl_core.dll',
'System32\mkl_def.dll','System32\mkl_intel_thread.dll',
'SysWOW64\libiomp5md.dll','SysWOW64\mkl_core.dll','SysWOW64\mkl_intel_thread.dll',
'SysWOW64\mkl_p4.dll', 'SysWOW64\mkl_p4m.dll','SysWOW64\mkl_p4m3.dll',
'SysWOW64\mkl_p4p.dll']
Remove all these dll files from C:\Windows\SysWOW64 and C:\Windows\System32
Just do this and restart the spyder once again and hurrrahhhh!!! ur problem will be solved and spyder will open without showing any ordinal 242 error............just do it it is the only solution..
What fixed this issue for me was to uninstall Amplitube and ActiveState Python. I was receiving this exception while using Anaconda prompt and some NLP packages.
I had the same problem and after trying many solutions, including the above, I finally managed to solve it.
First, open command prompt(Administrator) and input:
set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
Then, launch the Spyder IDE, always using the command prompt by simply inputting:
spyder
It is important to always launch spyder with the command prompt. If you launch Spyder with the Anaconda Navigator, it will still give you the error message.
Following #Azrael_DD's solution to downgrade to anaconda v5.2.0, you can also do it through a normal console:
conda install anaconda=5.2.0
Another way which Works for me (I deleted all DLL files but the problem continued) was to downgrade ANACONDA to Anaconda3-5.2.0-Windows-x86_64.
I got the installer in this link

eric6 can't compile in Python form (could not start pyuic5.exe)

I am trying to create a GUI using eric6 for a Python script I coded recently, however when I right click in eric6 on the new *.ui file I create and I try to compile it (choosing 'Compile Form'), the following error is displayed - could not start puyic5.exe:
I have tried the (very few) online solutions but without any luck (for example, checking that in the pyuic5.bat file, the mentioned directory is without any space, and also tried to re-install Qt5). Furthermore, even though both Python and PyQt are correctly installed, pyuic5.exe is missing in the directory specified in the error. Also, everything seems setup ok in the PATH in the system environmental variables.
Versions info:
Python 3.4.5
Qt 5.4.1
PyQt 5.4.1
eric6 17.06
EDIT: if it can help debugging my issue, I would like to add that if I open a command prompt and I invoke pyuic5 mainform.ui -o mainform.py it works without problems. Instead, in eric6, such error message is generated.
Thank you in advance for any precious help and guidance you may offer !
Sincerely,
Paolo
Solved downgrading to an older version of eric6 (precisely to v 17.04.1). Thought it might be useful to share in case somebody encounters the same problem.

Process finished with exit code -1073741515 (0xC0000135)

I'm running a python script and it used to work (it even does on my other laptop right now) but not on my current computer - I just get the error code:
Process finished with exit code -1073741515 (0xC0000135)
I don't get any other results - not even from "print" commands at the beginning of the file.
I haven't found anything specific to that.
I re-installed python (2.7.9), pygame (1.9.1) and even pycharm (tried 4.5 first, now with 5.0 - same result)
Does anyone know what that error code means? I couldn't find anything about it.
reinstall python – you don't have python33.dll in c:\WINDOWS\system32\
Maybe you have different python versions – look at folders in root of c:
If yes, then point to your version of python.exe in pyCharm > Settings > Project Interpreter
This may be due to another program locking that memory location.
Before you try more drastic measures, know that restarting the computer fixed the problem for me.
The error seems to be related to issues in native code (e.g. C/C++) and might be related to issues in loading some dll file. To know which file, the Windows "Event Viewer" is your friend.
The "Event Viewer" -> "Windows Logs" -> "Application" feed usually shows one or more rows for each crashed application and one of them should list the problematic filename.
Personally I observed similar issue with matplotlib on Python 3.9 (installed using Anaconda on Windows 10). I could see this kind of error when the code was executed using PyCharm. The same code just crashed with no visible errors when starting from Anaconda console.
The Event viewer then showed issue with freetype.dll. In this case, the problem was fixed by downgrading the packege from 2.11.0 to 2.10.4:
conda install freetype=2.10.4
Depending on the exact issue, I could imagine that removing pycache folder might help (like mentioned in other answers). Also, sometimes it might make sense to look at the PATH environment variable to actually understand why certain dll file is loaded from such a location.
I got this error in PyCharm after upgrading pyarrow to the most recent version -- 0.16 --- using pip, running the same code I had ran before this update which used pandas read_parquet specifying the engine="pyarrow" triggering use of this library. After uninstalling and installing the previous version with
pip install pyarrow=="0.15"
the problem resolved.
I encountered the same error when running .py in PyCharm on Windows. Inspired by https://thenewboston.com/forum/topic.php?id=10088, I uninstalled and reinstalled Python. When reinstalling, I checked the ADD PYTHON TO THE PATH Option. After recreating the virtual environment in PyCharm, the error was gone.
Update: On another Windows PC (64-bit), I encountered the same error where reinstalling Python was not enough. I tried two things.
Uninstalling 32-bit Python and installing 64-bit Python. Namely downloading python-3.6.4-amd64.exe instead of python-3.6.4.exe
Recreating the Pycharm project from github.
Between the two actions, the error was gone.
taskkill /F /IM python.exe
Try this if it just happened out of the bloom and it worked normally before that error occurred.
I solved it by disabling "PyQt compatible" checkbox in the Settings under Build, Execution, Deployment --> Python Debugger.
After that, it should debug properly.
Here is caused it and solution:
The computer had two physical processors. The code uses Numba for parallel computations. Upon disabling and re-enabling hyperthreading this issue started. To solve it clear pycache folder and run the program.
I encountered this error in my code as well, in my case the problem was sharing pickle which produced in Unix machine one a Windows one.
**I faced the same situation and the malfunction stems from trying to run both terminal processor and graphical user interfaces. When I clicked the button program stopped running **
Solution: I disabled terminal inputs and work with graphics.
For example:
if you do this
entry1=Entry(root,width=10).pack()
variable= str(input("Whats your name?"))
You will see the error.
if you delete either entry1 or variable, you will not see the problem.
If you're trying create a .svm use dlib probably the problem is in .xml, some image that you use is cause the problem. Try to create a new .xml putting out a image(any image) or remove that your .xml and test, try this even you find out the image problem.
For exemple, the image "treinamento3.jpg" was the problem. I removed this command line:
< image file='delirium\treinamento3.jpg'>
< box top='213' left='86' width='46' height='49'/ >
< box top='531' left='47' width='125' height='123'/ >
< /image >
from my .xml for solve my problem.

Categories

Resources