Questions tagged [pywebview]
52 questions
0
votes
1 answer
Python pywebview to evaluate javascript from a separate file
I want to use pywebview in Python to make an app using HTML/JavaScript, potentially large, so I would like to keep separate files, index.html and index.js for ease of management.
For purpose of question, the simple codes for html & js are used as…

nphaibk
- 71
- 7
0
votes
0 answers
PyWebview and PysTray - show/hide window on tray icon click?
I am attempting to make a simple webview of Google.com using PyWebview that can keep an icon present in the Windows system tray. On clicking the system tray icon, if the webview window is visible, the window will be hidden, and if it is not visible…

Jared Robertson
- 81
- 7
0
votes
0 answers
printing to console makes pywebview+flask exe crash
Below is simple test code named app.py
from flask import Flask
import webview
app = Flask(__name__)
@app.route('/')
def hello_world():
#print('test') # <- note here
return 'Hello World!'
if __name__ == '__main__':
window =…

qing6010
- 99
- 3
- 7
0
votes
0 answers
How can Jinja2 Pywebview support CSS and Boostrap?
Im trying to use stylesheets and bootstrap for Pywebview's jinja example.
No where in the Jinja2 documentation could I find CSS or JS when using CTRL+F.
These are standalone GUIs for Windows found here:…

Sasha Alexander
- 11
- 3
0
votes
0 answers
I am attempting to run a very basic pywebview code and I get an initialization failed with exception error
import webview
webview.create_window('Hello World', 'https://pywebview.flowrl.com/')
webview.start()
This code is the most basic example from the documentation.
The error is the following: runfile('C:/Users/EQUIPO/Desktop/Programming Finance/User…

Scieoner
- 11
- 1
- 6
0
votes
1 answer
Cannot get cookies after closing window in PyWebView
After calling webview.start, closing the window, and calling the window.get_cookies function, I am getting this error: KeyError: 'master'
Traceback:
Traceback (most recent call last):
File "D:\better_gui.py", line 34, in
)
…
0
votes
0 answers
Run NodeJs project using Pywebview
I've a project builded in NodeJs and what im trying to do is running using pywebview library.
Pywebview allow us to create a server and run the project using a WindowForm..
Example:
index.html

Bruce Ecurb
- 75
- 6
0
votes
0 answers
Pywebview & pyinstaller: How to set inbuilt-http server root as current folder as exe
I am trying to use pywebview to display html file using inbuilt http server. This ways I can load xlsx file over http fetch() witth Javascript.
Everything works until I pack this into single exe using pyinstaller. It says "Path /index.html not…

Nithi2023
- 423
- 5
- 12
0
votes
0 answers
Is it possible to use pywebview on windows 7?
I am trying to run project using pywebview on virtual win7 x32 with the goal of freezing it with pyinstaller and am getting all sorts of exceptions. Latest version seems to consider my system being arm64, version before that searches for shcore,…

Wisconsin
- 1
- 1
0
votes
1 answer
Python pywebview. Trouble with pythonnet - Unbehandelte Ausnahme: System.NullReferenceException. TypeError: 'Assembly' object is not subscriptable
import webview
webview.create_window('Hello world', 'https://pywebview.flowrl.com/hello')
webview.start()
Gives an error when executed:
Unbehandelte Ausnahme: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz…

Max Payne
- 21
- 2
0
votes
1 answer
Eel - ask for directory input
I am developing modern-looking local app in Python with Eel and I want to open OS's default dialog to select directory. But I have found that Eel does not provide that.
I have tried:
dialog from HTML/JS, but browser provides just dialog for file/s…

Foreen
- 369
- 2
- 17
0
votes
0 answers
pywebview Load html, css and js into DOM
I would like to know how to insert CSS, JS, and HTML into a DOM. I have a CSS, JS, and HTML file that should be loaded into the DOM after calling a URL.
I have the DOM itself yes can load via
import webview
def change_dom(window):
result =…

marv
- 19
- 3
0
votes
1 answer
DBC (dash bootstrap components ) are not rendered in the pywebview; But renders in the browsers
I am trying to create a web application using the python dash framework. When I tried with normal HTML or dcc (dash core components), pywebview is able to load the contents. But If I use dash bootstrap components in my UI, the pywebview displays the…

Muthu Saravanan R
- 41
- 3
0
votes
1 answer
Updating a React state variable throws cross-origin error
Context
At the moment I am working on a project where I want to get data, more specifically a list/Array of Strings, from my Python API and display that list with React.
I am getting the list and it looks completely fine. No undefined values,…

flosommerfeld
- 634
- 2
- 11
- 23
0
votes
0 answers
Is it possible to add "video" tag to PyWebview and to autoplay? I'm using linux mint20 with python3.8.
In main.html
When I run python main.py I get js: Uncaught (in promise) NotSupportedError: The…

Daniel van Eeden
- 11
- 1