GithubHelp home page GithubHelp logo

richlegrand / dash_devices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plotly/dash

87.0 87.0 11.0 27.3 MB

A fork of plotly/dash to help Dash deal with devices.

Home Page: https://plotly.com/dash

License: MIT License

Python 27.71% JavaScript 71.42% CSS 0.81% HTML 0.04% Shell 0.02%

dash_devices's People

Contributors

alexcjohnson avatar batalex avatar bpostlethwaite avatar byronz avatar chriddyp avatar cldougl avatar coopy avatar hinnefe2 avatar jackparmer avatar jbampton avatar marc-andre-rivet avatar mjclawar avatar mkcor avatar moorepants avatar multimeric avatar mungojam avatar ned2 avatar nicolaskruchten avatar owenmatsuda avatar pravj avatar renovate-bot avatar richlegrand avatar rmarren1 avatar rpkyle avatar scjody avatar shammamah-zz avatar sherry0429 avatar stevej2608 avatar t4rk1n avatar valentijnnieman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dash_devices's Issues

[BUG] Always autoreload and fail even when debug=False and dev_tools_hot_reload=False

I run the server with this:

app.run_server(
    debug=False,
    host='0.0.0.0',
    loop=main_thread_loop,
    dev_tools_hot_reload=False,
)

Env:

dash                              1.13.4
dash-bootstrap-components         0.10.0
dash-core-components              1.10.1
dash-daq                          0.5.0
dash-devices                      0.1.2
dash-html-components              1.0.3
dash-pivottable                   0.0.1
dash-renderer                     1.5.1
dash-table                        4.8.1
- OS: WSL
- Browser: Edge chrome

Describe the bug

Whenever I change and save code of dependencies of the dash file, it always seems try to reload and fail:

Traceback (most recent call last):
  File "jat/jat/trade_dash.py", line 605, in <module>
    app.run_server(
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dash_devices/dash.py", line 1987, in run_server
    self.server.run(host=host, port=port, debug=debug, **flask_run_options)
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/quart/app.py", line 1400, in run
    loop.run_until_complete(serve(self, config))
  File "/home/lxuwsl/miniconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/hypercorn/asyncio/__init__.py", line 39, in serve
    await worker_serve(app, config, shutdown_trigger=shutdown_trigger)
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/hypercorn/asyncio/run.py", line 157, in worker_serve
    restart()
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/hypercorn/utils.py", line 168, in restart
    os.execv(executable, [executable] + args)
OSError: [Errno 8] Exec format error

That's weird.

What's the status/strategy of this project?

This is really a great project and thanks for making it available. But I wonder what the status is. Looking at it today it's 3k+ commits behind the plotly/dash project. How are we compatible with latest version dash? And what's the longer term strategy of this project? Thanks.

[Feature Request] Update underlying dash library version

There are some features in newer versions of dash which would be nice to have support for in dash_devices. I'm specifically thinking of the "title" and "update_title" arguments which can be passed to the Dash constructor in vanilla dash.

[BUG] Error: dash_html_components was not found

Resolved: when downgrading from dash version 2.0.0 to 1.12 it worked.

Environment:

dash                         2.0.0
dash-core-components         2.0.0
dash-daq                     0.1.7
dash-devices                 0.1.4
dash-html-components         2.0.0
dash-renderer                1.0.0
dash-table                   5.0.0

  • if frontend related, tell us your Browser, Version and OS

    • OS: Ubuntu 21.10
    • Browser: chrome and chromium

Error thrown in console when trying to run example1.py script

Nothing gets rendered to screen. which I think makes sense based on the error.

I expected to be able to run the example script based on the readme.

I doubt this is an actual issue, I could just be missing something simple.

Screenshots

If applicable, add screenshots or screen recording to help explain your problem.
dash-devices-error
devices-blank

Application context

Hi,
I would like to use quart_auth module for login/logout handling. To use this, I need access to the quart application context, but for some reason i cant. Do anyone have an example for getting the current application context, that I can use for storing user login information?

[BUG] callback_shared leads to infinite page loading

I want to make a button that changes its text upon click and triggers the next callback (plot update)

@app.callback(
    [Output("interval-graph", "disabled"), 
    Output("start-record-button", "buttonText")],
    [Input("start-record-button", "n_clicks")],
    [State("interval-graph", "disabled")],
)
def stop_GraphUpdate(n_clicks, current):
    if n_clicks == 0:
        return True, "Start record"
    return not current, "Stop Record" if current else "Start Record"

However, if I use callback_shared (which I want), page never loads and the Python script cannot be stopped with Ctrl + C.

Env

dash                      1.13.4
dash-bootstrap-components 0.11.3
dash-core-components      1.10.1
dash-daq                  0.5.0
dash-devices              0.1.3
dash-html-components      1.0.3
dash-renderer             1.5.1
dash-table                4.8.1

Describe the bug

What causes a problem is a button callback. If simplified:

import dash_devices
from dash_devices.dependencies import Input, Output, State
import dash_html_components as html
import dash_core_components as dcc

app = dash_devices.Dash(__name__)
app.config.suppress_callback_exceptions = True


app.layout = html.Div([
    html.Button(
        id = 'start-stop',
        n_clicks=0
        style={'width': 150, 'height':50, 'color':'orange'}
    ), 
])

@app.callback_shared(
    Output("start-stop", "children"),
    [Input("start-stop", "n_clicks")],
)

def button_text(n_clicks):
    if n_clicks == 0 or n_clicks %2 == 0:
        return "Start"
    else:
        return 'Stop'

if __name__ == "__main__":
    app.run_server(
    debug=True,
    host='localhost', port = 5000)
    

Which leads to infinite page loading.

Expected behavior

Observed only for callback_shared, callback behaves as it should.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.