openbb-finance / pywry Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Build fails with rustc 1.72.0 with the following errors (fine with rustc 1.64.0):
error[E0308]: mismatched types
--> src/headless.rs:155:51
|
155 | pub fn start_headless(console: ConsolePrinter) -> Result<(), String> {
| -------------- ^^^^^^^^^^^^^^^^^^ expected `Result<(), String>`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected enum `Result<(), std::string::String>`
found unit type `()`
error[E0308]: mismatched types
--> src/window.rs:218:46
|
218 | pub fn start_wry(console: ConsolePrinter) -> Result<(), String> {
| --------- ^^^^^^^^^^^^^^^^^^ expected `Result<(), String>`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected enum `Result<(), std::string::String>`
found unit type `()`
Easily create HTML webviewers in python utilizing the yrw library
should be wry not yrw
Tested on Linux with rustc 1.72.0 and 1.64.0 and python 3.9 and 3.10 in a clean conda environment, installing pywry through pip.
Build fails because method EventLoop::with_user_event is used and wry 0.31.0 is specified in Cargo.toml, even though this method was dropped in 0.31.0.
error[E0599]: no function or associated item named `with_user_event` found for struct `EventLoop<_>` in the current scope
--> src/headless.rs:160:52
|
160 | let event_loop: EventLoop<UserEvent> = EventLoop::with_user_event();
| ^^^^^^^^^^^^^^^ function or associated item not found in `EventLoop<_>`
error[E0599]: no function or associated item named `with_user_event` found for struct `EventLoop<_>` in the current scope
--> src/window.rs:223:52
|
223 | let event_loop: EventLoop<UserEvent> = EventLoop::with_user_event();
| ^^^^^^^^^^^^^^^ function or associated item not found in `EventLoop<_>`
That being said, with_user_event
still exists in class EventLoopBuilder
, and the latter is used by pywry in headless.rs
and window.rs
on Windows and Mac platforms. Should we use it on all platforms now?
Add two way communication so we can call Python
from frontend or call JS
from Python
Hello!
I may have found a security issue in latest version of pywry. Following responsible disclosure, is there an email or other private channel where I could share the details?
Thank you
Currently, the known Python HTML GUI libraries are not satisfied with anything like Electron, and I am very surprised to see such a day.
The error:
/home/user/.conda/envs/obb/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /lib64/libwebkit2gtk-4.0.so.37)
How to replicate:
python -c 'import pywry'
The installed files are one version short
(obb) [user@fedoralaptop OpenBBTerminal]$ strings /home/user/.conda/envs/obb/bin/../lib/libstdc++.so.6 | grep GLIBCXX_3.4.3
GLIBCXX_3.4.3
GLIBCXX_3.4.30
GLIBCXX_3.4.31
GLIBCXX_3.4.31
GLIBCXX_3.4.3
GLIBCXX_3.4.30
When building from source using maturin I'm getting the following error:
cargo rustc --lib --manifest-path Cargo.toml --features pyo3/extension-module --release --no-default-features --release -v -- --crate-type cdylib
error: the argument '--release' cannot be used multiple times
This is continuation of this issue
OpenBB-finance/OpenBBTerminal#5104
Just running this example
import asyncio
import sys
from pywry import PyWry
async def main_loop():
while True:
await asyncio.sleep(1)
if __name__ == "__main__":
try:
handler = PyWry()
handler.send_html("<h1 style='color: red;'>Welcome to PyWry!</h1>")
handler.start()
# PyWry creates a new thread for the backend,
# so we need to run the main loop in the main thread.
# otherwise, the program will exit immediately.
handler.loop.run_until_complete(main_loop())
except KeyboardInterrupt:
print("Keyboard interrupt detected. Exiting...")
sys.exit(0)
Gives 100 CPU usage. Why is that ? This consumes more cpu than anything else in openbb.
Is it busy waiting ?
Is it missing asyncio.sleep
somewhere?
Hi
I was trying to build OpenBB Terminal
from source but when running poetry install -E all
your package failed to build.
I am using a computer with Ubuntu 22.04.
The error output I got was this.
After running
sudo apt-get install libjavascriptcoregtk-4.1-dev
I got an equivalent error, now saying that I need the package libsoup-3.0
.
By running
sudo apt install libsoup-3.0-dev
I again got an equivalent error, now saying that I need the package libwebkit2gtk-4.1
๐ค
Finally, by running
sudo apt install libwebkit2gtk-4.1-dev
and then poetry install -E all
I succeeded in building OpenBBTerminal
.
I am curious to why the dependency issues weren't handled by the underlying Rust
code?
Cheers
jsr-p
Depends on #85
The script should closed after the window is closed
We would love to add pywry to our examples at https://github.com/crabnebula-dev/cargo-packager - which is a generic bundler and updater based on the original systems we built for Tauri, but designed for use by anyone who needs the elegance and security of developer signatures to verify updates regardless of their underlying language paradigm.
When compiling the example to exe
using pyinstaller
pyinstaller --onedir main.py
and then opening the compiled exe
file the app starts but no window is opened and no error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.