how to debug in dash jupyter notebook? - plotly-dash

when running dash in jupyter notebook, how to do debugging?
typically, I use below if I just run jupyter notebook,
import ipdb; ipdb.set_trace()
However with dash, it doesn't work, it just show ipdb> , then no prompt for me to enter for debugging.
Thanks

Related

Converting ipynb to html from Colab not work properly

I am using Colab to write a notebook using plotly. Within the notebook everything is fine and I can see the pie, but after converting the notebook into a html I don't see it.
this is the code:
import matplotlib.pyplot as plt
import plotly.express as px
Labels=['No', 'Ex-fumatore', 'Fumatore']
values=[1838, 1293, 574]
fig=px.pie(values = values,names = Labels,hole=.5,title = "Tipologie fumatori In Percentuale")
fig.show()
!jupyter nbconvert --to html /content/pie.ipynb
can somebody help me?
Thanks
There could be various reasons why converting an ipynb file to HTML from Colab is not working properly. Here are some possible solutions you could try:
1. Make sure that you have installed the required libraries in Colab that are needed for conversion. To install nbconvert, run the following command in a new cell:
!pip install nbconvert
2. If the nbconvert library is already installed, try uninstalling and reinstalling it to ensure that you have the latest version. You can uninstall it by running the following command:
!pip uninstall nbconvert
And then reinstall it by running:
!pip install nbconvert
3. Check that your notebook is properly saved and there are no unsaved changes. If there are unsaved changes, try saving the notebook and then converting it again.
4. Check the output of the conversion process for any error messages or warnings. These can help you identify the source of the problem.
5. Try converting the notebook to HTML using a different method. For example, you could download the notebook file to your local machine and then use a local installation of Jupyter Notebook to convert it to HTML.

I cannot import sqlalchemy via the anaconda prompt

Because of installing a proxy I deleted Anaconda prompt. After re-installing this I tried to read code in sublime text.
In order to read this sublime text, sqlalchemy is required, which I have justed installed, by typing in;
pip install SQLAlchemy
However, when i type in, i get the error:
import sqlalchemy
'import' is not recognized as an internal or external command,
operable program or batch file.
Can someone please explain what I am doing wrong?
Kind regards

Jupyter lab widgets not exporting to HTML

I have a problem with widgets' visualization and export in Jupyter lab. Basically, some widgets (e.g. the text) show their output in the log rather than in the console (see the image below).
Moreover, when I try to export them in HTML they don't appear at all (see the second image below).
I'm using the following versions:
Python: 3.7.7;
Jupyter Lab: 1.2.6;
Jupyter Notebook: 6.0.3;
Jupyter core: 4.6.3;
Ipywidgets: 7.5.1;
Lab-manager: 1.1.
Thanks in advance for your help.
Do this through VoilĂ 
pip install voila
or
conda install voila -c conda-forge
And then:
voila path/to/your/notebook.ipynb
For more information and example:
And VoilĂ !
Creating an Interactive Dashboard from Jupyter Notebook with Voila

Using Tcl with Jupyter notebook

I downloaded Anaconda, and have been using Jupyter notebook. Now I would like to use it with Tcl. I followed the instructions at https://github.com/rpep/tcl_kernel, (which is to pip3 install tcl_kernel).
It has installed in AppData\Local\Programs\Python\Python36-32.
However, Tcl does not appear as an option for a new notebook.
Can anyone advise?
Thankyou.
Installing Tcl on Jupyter Notebook: intel offers a package to be used on Jupyter Notebook, where you can develop your projects and view the result of the codes.
To perform the installation (linux), type the following command in the terminal:
conda install -c intel tcl
pip3 install tcl_kernel
python3 -m tcl_kernel.install
conda update conda
Link of the pages so that you can search for the equivalent packages on Win / Mac:
https://anaconda.org/intel/tcl
https://github.com/rpep/tcl_kernel
Ready! When accessing Jupyter Notebook, select the Tcl option in the 'New' section.
There are versions for various Operating Systems. I chose Linux because it is the only one on computers here at home.
I don't see that kernel listed under 'new' -- but if I open another notebook and try the 'kernel' menu, there is a 'change kernel' item that does the job.

How to get caffe notebook example

I see many blogs relate caffe something about notebook example? I only find "example " dir in the caffe source code on github, how to get the "notebook example" dir?
By notebook they mean to say ipython notebook. Details of ipython notebook can be found here.
The file format of ipython notebook is .ipynb. The files with this extension can be found in the examples folder.
If the ipython notebook is successfully installed, you can try running the 01-learning-lenet.ipynb example by typing : ipython notebook ./examples/01-learning-lenet.ipynb from the caffe folder.