justpy-org / justpy

An object oriented high-level Python Web Framework that requires no frontend programming
https://justpy.io
Apache License 2.0
1.22k stars 96 forks source link

fix broken demos #540

Closed WolfgangFahl closed 2 years ago

WolfgangFahl commented 2 years ago
  1. event_demo5 button_click not defined
WolfgangFahl commented 2 years ago
mount all has been clicked ... trying to mount 90 demos 
mounting 1/90:examples.tutorial.bokeh.bokeh_test:bokeh_test:bokeh_test
Using data directory: /Users/wf/.bokeh/data
Skipping 'CGM.csv' (checksum match)
Skipping 'US_Counties.zip' (checksum match)
Skipping 'us_cities.json' (checksum match)
Skipping 'unemployment09.csv' (checksum match)
Skipping 'AAPL.csv' (checksum match)
Skipping 'FB.csv' (checksum match)
Skipping 'GOOG.csv' (checksum match)
Skipping 'IBM.csv' (checksum match)
Skipping 'MSFT.csv' (checksum match)
Skipping 'WPP2012_SA_DB03_POPULATION_QUINQUENNIAL.zip' (checksum match)
Skipping 'gapminder_fertility.csv' (checksum match)
Skipping 'gapminder_population.csv' (checksum match)
Skipping 'gapminder_life_expectancy.csv' (checksum match)
Skipping 'gapminder_regions.csv' (checksum match)
Skipping 'world_cities.zip' (checksum match)
Skipping 'airports.json' (checksum match)
Skipping 'movies.db.zip' (checksum match)
Skipping 'airports.csv' (checksum match)
Skipping 'routes.csv' (checksum match)
Skipping 'haarcascade_frontalface_default.xml' (checksum match)
mounting 2/90:examples.tutorial.page_events.loading_page_no_stagger:loading_page_no_stagger:loading_page_no_stagger
mounting 3/90:examples.tutorial.page_events.result_test:result_test:result_test
mounting 4/90:examples.tutorial.html_components.html_comps6:html_comps6:html_comps6
mounting 5/90:examples.tutorial.html_components.html_comps2:html_comps2:html_comps2
mounting 6/90:examples.tutorial.html_components.html_comps:html_comps:html_comps
mounting 7/90:examples.tutorial.html_components.html_comps3:html_comps3:html_comps3
mounting 8/90:examples.tutorial.html_components.show_demo:show_demo:show_demo
mounting 9/90:examples.tutorial.html_components.link_demo2:link_demo2:link_demo2
mounting 10/90:examples.tutorial.html_components.list_demo:list_demo:list_demo
mounting 11/90:examples.tutorial.html_components.link_demo1:link_demo1:link_demo1
mounting 12/90:examples.tutorial.html_components.html_comps4:html_comps4:html_comps4
mounting 13/90:examples.tutorial.html_components.html_comps5:html_comps5:html_comps5
mounting 14/90:examples.tutorial.html_components.html_comps1:html_comps1:html_comps1
mounting 15/90:examples.tutorial.input.radio_test2:radio_test2:radio_test2
mounting 16/90:examples.tutorial.input.focus_test_input:focus_test_input:focus_test_input
mounting 17/90:examples.tutorial.input.check_test:check_test:check_test
mounting 18/90:examples.tutorial.input.comp_test:comp_test:comp_test
mounting 19/90:examples.tutorial.input.input_demo2:input_demo2:input_demo2
mounting 20/90:examples.tutorial.input.input_demo3:input_demo3:input_demo3
mounting 21/90:examples.tutorial.input.input_demo4:input_demo4:input_demo4
mounting 22/90:examples.tutorial.input.input_demo5:input_demo5:input_demo5
mounting 23/90:examples.tutorial.input.input_demo1:input_demo1:input_demo1
mounting 24/90:examples.tutorial.input.color_demo:color_demo:color_demo
mounting 25/90:examples.tutorial.input.radio_test1:radio_test1:radio_test1
mounting 26/90:examples.tutorial.equations.eq_test:eq_test:eq_test
mounting 27/90:examples.tutorial.basic_concepts.hello_world3:hello_world3:hello_world3
mounting 28/90:examples.tutorial.basic_concepts.hello_world2:hello_world2:hello_world2
mounting 29/90:examples.tutorial.basic_concepts.hello_world1:hello_world1:hello_world1
mounting 30/90:examples.tutorial.basic_concepts.hello_world4:hello_world4:hello_world4
mounting 31/90:examples.tutorial.altair.altair_chart_test:altair_chart_test:altair_chart_test
No module named 'vega_datasets'
Traceback (most recent call last):
  File "/Users/wf/Documents/pyworkspace/justpy/examples/demo_browser.py", line 204, in mount
    demo.mount(jp.app)
  File "/Users/wf/Documents/pyworkspace/justpy/jpcore/justpy_app.py", line 663, in mount
    demo_module = importlib.import_module(self.pymodule)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/wf/Documents/pyworkspace/justpy/examples/tutorial/altair/altair_chart_test.py", line 7, in <module>
    from vega_datasets import data
ModuleNotFoundError: No module named 'vega_datasets'

mounting 32/90:examples.tutorial.request_object.dog_pic3:dog_pic3:dog_pic3
mounting 33/90:examples.tutorial.request_object.dog_pic2:dog_pic2:dog_pic2
mounting 34/90:examples.tutorial.request_object.demo_function:demo_function:demo_function
mounting 35/90:examples.tutorial.request_object.dog_pic1:dog_pic1:dog_pic1
mounting 36/90:examples.tutorial.tailwind.text_colors:text_colors:text_colors
mounting 37/90:examples.tutorial.handling_events.event_demo1:event_demo1:event_demo1
mounting 38/90:examples.tutorial.handling_events.debounce_test:debounce_test:debounce_test
mounting 39/90:examples.tutorial.handling_events.event_demo5:event_demo5:event_demo5
mounting 40/90:examples.tutorial.handling_events.event_comp_test:event_comp_test:event_comp_test
mounting 41/90:examples.tutorial.handling_events.event_demo4:event_demo4:event_demo4
mounting 42/90:examples.tutorial.handling_events.comp_test:comp_test:comp_test
mounting 43/90:examples.tutorial.handling_events.target_test:target_test:target_test
mounting 44/90:examples.tutorial.handling_events.event_demo7:event_demo7:event_demo7
mounting 45/90:examples.tutorial.handling_events.event_demo3:event_demo3:event_demo3
mounting 46/90:examples.tutorial.handling_events.event_demo2:event_demo2:event_demo2
mounting 47/90:examples.tutorial.handling_events.out_test:out_test:out_test
mounting 48/90:examples.tutorial.handling_events.event_demo6:event_demo6:event_demo6
mounting 49/90:examples.tutorial.model_and_data.model_demo1:model_demo1:model_demo1
mounting 50/90:examples.tutorial.model_and_data.input_demo_model1:input_demo_model1:input_demo_model1
mounting 51/90:examples.tutorial.model_and_data.input_demo_model4:input_demo_model4:input_demo_model4
mounting 52/90:examples.tutorial.model_and_data.input_demo_model3:input_demo_model3:input_demo_model3
mounting 53/90:examples.tutorial.model_and_data.model_demo3:model_demo3:model_demo3
mounting 54/90:examples.tutorial.model_and_data.input_demo_model2:input_demo_model2:input_demo_model2
mounting 55/90:examples.tutorial.model_and_data.model_demo2:model_demo2:model_demo2
mounting 56/90:examples.tutorial.routes.route1:None:route1
module 'examples.tutorial.routes.route1' has no attribute 'None'
Traceback (most recent call last):
  File "/Users/wf/Documents/pyworkspace/justpy/examples/demo_browser.py", line 204, in mount
    demo.mount(jp.app)
  File "/Users/wf/Documents/pyworkspace/justpy/jpcore/justpy_app.py", line 664, in mount
    self.wpfunc = getattr(demo_module, self.wpfunc_name)
AttributeError: module 'examples.tutorial.routes.route1' has no attribute 'None'

mounting 57/90:examples.tutorial.routes.route3:None:route3
module 'examples.tutorial.routes.route3' has no attribute 'None'
Traceback (most recent call last):
  File "/Users/wf/Documents/pyworkspace/justpy/examples/demo_browser.py", line 204, in mount
    demo.mount(jp.app)
  File "/Users/wf/Documents/pyworkspace/justpy/jpcore/justpy_app.py", line 664, in mount
    self.wpfunc = getattr(demo_module, self.wpfunc_name)
AttributeError: module 'examples.tutorial.routes.route3' has no attribute 'None'

mounting 58/90:examples.tutorial.routes.route2:None:route2
module 'examples.tutorial.routes.route2' has no attribute 'None'
Traceback (most recent call last):
  File "/Users/wf/Documents/pyworkspace/justpy/examples/demo_browser.py", line 204, in mount
    demo.mount(jp.app)
  File "/Users/wf/Documents/pyworkspace/justpy/jpcore/justpy_app.py", line 664, in mount
    self.wpfunc = getattr(demo_module, self.wpfunc_name)
AttributeError: module 'examples.tutorial.routes.route2' has no attribute 'None'

mounting 59/90:examples.tutorial.routes.bye_function1:bye_function1:bye_function1
mounting 60/90:examples.tutorial.ajax.hello_test:hello_test:hello_test
mounting 61/90:examples.tutorial.ajax.reload_demo:reload_demo:reload_demo
mounting 62/90:examples.tutorial.getting_started.hello_world:hello_world:hello_world
mounting 63/90:examples.tutorial.quasar_example:quasar_example:quasar example
mounting 64/90:examples.tutorial.db_test:db_test:database test
mounting 65/90:examples.tutorial.after_demo:after_demo:after demo
mounting 66/90:examples.tutorial.drag_test:drag_test:drag & drop test
mounting 67/90:examples.tutorial.tab_comp_test:tab_comp_test:tabgroup test
mounting 68/90:examples.grids_tutorial.creating_grids.grid_test4:grid_test4:grid_test4
mounting 69/90:examples.blog.reactivity.todo_app3:todo_app3:todo_app3
mounting 70/90:examples.blog.reactivity.todo_app2:todo_app2:todo_app2
mounting 71/90:examples.blog.reactivity.todo_app1:todo_app1:todo_app1
mounting 72/90:examples.blog.reactivity.todo_app4:todo_app4:todo_app4
mounting 73/90:examples.charts_tutorial.stock_charts.stock_test2:stock_test2:stock_test2
mounting 74/90:examples.charts_tutorial.stock_charts.stock_test1:stock_test1:stock_test1
mounting 75/90:examples.charts_tutorial.pandas.women_majors1:women_majors1:women_majors1
mounting 76/90:examples.charts_tutorial.pandas.women_majors3:women_majors3:women_majors3
mounting 77/90:examples.charts_tutorial.pandas.women_majors2:women_majors2:women_majors2
mounting 78/90:examples.stackoverflow.q73497028:grid_test:Stackoverflow question 73497028 test
mounting 79/90:examples.issues.issue_270_aggrid_timestamp:grid_test_issue270:Issue 270 aggrid timestamp value
mounting 80/90:examples.issues.issue_279_key_error:issue_279:Issue 279 KeyError
mounting 81/90:examples.issues.issue_387_aggrid_tabgroup:tab_comp_test:Issue 387 aggrid tabgroup
mounting 82/90:examples.quasar_tutorial.QRating.rating_test2:rating_test2:rating_test2
mounting 83/90:examples.quasar_tutorial.QRating.rating_test1:rating_test1:rating_test1
mounting 84/90:examples.clickdemo:click_demo:click demo
mounting 85/90:examples.uber-nyc-pickups:pydeck_demo:uber pydeck demo
mounting 86/90:examples.happiness:happiness_plot:happiness plot demo
mounting 87/90:examples.dogs:dog_test:dogs demo
mounting 88/90:examples.iris:iris_data:iris demo
mounting 89/90:examples.blackjack:blackjack:blackjack demo
mounting 90/90:examples.multiuploads:multiupload:multi uploads demo
byzakyz commented 2 years ago

Should this be happening here?

B-A

elimintz commented 2 years ago

Yes, when a series is disabled, there is an option for its label to move down

WolfgangFahl commented 2 years ago
 File "/Users/wf/Documents/pyworkspace/justpy/examples/tutorial/altair/altair_chart_test.py", line 7, in <module>
    from vega_datasets import data
ModuleNotFoundError: No module named 'vega_datasets'
byzakyz commented 2 years ago

Yes, when a series is disabled, there is an option for its label to move down

the problem is not always the clicked label is moving down/ up but sometimes some other label. I also had problems with moving all the labels up again after they were down. I guess I had to click them on a specific order so that they all move up again.

byzakyz commented 2 years ago

A_animated

examples/tutorial/custom_components/custom_comp_test2.py

"bg-{self.bg_color}-500 hover:bg-{self.bg_color}-700 " for color orange doesn't seem to be working

byzakyz commented 2 years ago

image

examples/tutorial/custom_components/custom_comp_test3.py

color='teal' not working, I don't know why not. I changed it to pink

A_animated

byzakyz commented 2 years ago

No change visible in chart when one of the bar, column, line tabs are choosen; until one of the image tabs are choosen: A_animated

examples/tutorial/custom_components/tab_comp_test1.py

Also I found the example code really hard to read on the tutorial on website. I can't get the code Block to expand so that I can read it properly without scrolling left and right. image image

byzakyz commented 2 years ago

A_animated

cant open link for explanation for this example: component-to-link-chart-and-grid

byzakyz commented 2 years ago

color and its text of the first color in jp.Tailwind.tw_dict['text_color'] is not visible:

A_animated

examples/tutorial/tailwind/text_colors.py

byzakyz commented 2 years ago

A_animated

examples/tutorial/transitions/transition_test.py

transition enter is not always working as it is supposed to, it only started working after second try in this example gif. I tired it out a bunch of times and its not working half of the time randomly.

byzakyz commented 2 years ago

examples/charts_tutorial/creating_charts/create_chart_test2.py not working: image

my_chart_def was defined in the previous file so I tried adding it: image worked but from ['bar', 'column', 'line', 'spline'] only bar chart was visible on website.

Copied the my_chart_def to this file instead and all chart types were visible. I don't know why the first option didn't work

byzakyz commented 2 years ago

https://127.0.0.1:8000/browsers not working:

image

examples/charts_tutorial/creating_charts/create_chart_test5.py

byzakyz commented 2 years ago

http://127.0.0.1:8000/?ticker=intc and non of the other parameters ibm, aapl,.. were working. changed from image to image because image was still giving the results for msft

examples/charts_tutorial/stock_charts/stock_test1.py

byzakyz commented 2 years ago

image

image

examples/charts_tutorial/tooltips/tool_tip_demo1.py

'Project Development' data inside series in options of Highchart has null values. Charts weren't visible on website until these were removed. I don't know how these should be handled. With None instead of null Highcharts won't work, and if it stays null using addict will also deliver them as null which does not exist in python.

Same problem also in tool_tip_demo2.py

byzakyz commented 2 years ago

On examples/charts_tutorial/chart_components/histogram_test.py

Why do I see the same charts even when I change or delete the "_options" entirely? When I do the same in examples/charts_tutorial/chart_components/pie_test.py this will either change the chart or cause en error.

byzakyz commented 2 years ago

I'm just seing an empty page for examples/tutorial/bokeh/bokeh_test.py examples/tutorial/bokeh/bokeh_test.py

byzakyz commented 2 years ago

examples/tutorial/markdown/md_test.py

image

byzakyz commented 2 years ago

examples/tutorial/ajax/hello_test.py

In tutorial it says I can verify that ajax is used under Network tab. I don't really know what this should look like but I didn't see anything changing. I read that I should identify if ajax is used under the XHR filter but it is empty. Where should I be looking for?

A-animated

byzakyz commented 2 years ago

tutorial/sessions/login_test.py

I think wp.redirect = '/login_test' and msg.page.redirect = '/login_test' should be redirected to '/login', since the other page does not exist and causes page not found error, or the login pages route should be set to this.

byzakyz commented 2 years ago

examples/quasar_tutorial/introduction/quasar_example2.py

The components are printed 4 times starting from root div, should't I see every component from html_string only once?

image

image

WolfgangFahl commented 2 years ago

grafik

WolfgangFahl commented 2 years ago

In the future there will be individual issues for broken demos.