You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chart=Chart()
# df already contains my data with columns time, open, high, low, closechart.set(df)
chart.show(block=True)
I expect this to open a new interactive chart window in my windows operating system. Note that I am running the above from my notebook which is opened in Brave Browser and is connected to my kernel running inside WSL2.
Current Behaviour
I get an error:
[pywebview] GTK cannot be loadedTraceback (most recent call last): File "/home/ubaid/miniforge3/envs/trade/lib/python3.13/site-packages/webview/guilib.py", line 37, in import_gtk import webview.platforms.gtk as guilib File "/home/ubaid/miniforge3/envs/trade/lib/python3.13/site-packages/webview/platforms/gtk.py", line 20, in <module> import giModuleNotFoundError: No module named 'gi'qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.
Reproducible Example
Install WSL2
Launch WSL2
Install conda (because I am running my notebook inside a conda environment)
Create conda environment
conda create -n my_env python
python -m pip install pandas jupyter lightweight-charts (and other libraries that you might need)
Launch jupyter
jupyter notebook
` Create a new notebook, paste the following code in a code cell and run it.
fromlightweight_chartsimportChartchart=Chart()
# df already contains my data with columns time, open, high, low, closechart.set(df)
chart.show(block=True)
You should get:
[pywebview] GTK cannot be loadedTraceback (most recent call last): File "/home/ubaid/miniforge3/envs/trade/lib/python3.13/site-packages/webview/guilib.py", line 37, in import_gtk import webview.platforms.gtk as guilib File "/home/ubaid/miniforge3/envs/trade/lib/python3.13/site-packages/webview/platforms/gtk.py", line 20, in <module> import giModuleNotFoundError: No module named 'gi'qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.
If you get any other error, for example, xyz library not found, then you can just google for it and install it manually using sudo apt install libxkbcommon-x11-0. I had to install couple of these before arriving at the above error.
Environment
- Windows OS: Windows 11 Pro, build 22631.4317
- WSL Version: 2, `Ubuntu 22.04.3 LTS`- Library: `lightweight-charts 2.1`
The text was updated successfully, but these errors were encountered:
I haven't yet tried running the above in a plain python script, but I believe the outcome would be the same. I think the error is more related being unable to find the Xming server running inside my windows.
PS: I have already installed Xming, and launched it (with configuration: multiple windows, display number 0, and other default configuration), but no success at the moment.
Expected Behavior
I expect this to open a new interactive chart window in my windows operating system. Note that I am running the above from my notebook which is opened in Brave Browser and is connected to my kernel running inside WSL2.
Current Behaviour
I get an error:
Reproducible Example
conda create -n my_env python
python -m pip install pandas jupyter lightweight-charts
(and other libraries that you might need)jupyter notebook
` Create a new notebook, paste the following code in a code cell and run it.
You should get:
If you get any other error, for example,
xyz
library not found, then you can just google for it and install it manually usingsudo apt install libxkbcommon-x11-0
. I had to install couple of these before arriving at the above error.Environment
The text was updated successfully, but these errors were encountered: