Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error- IPython is not defined #2

Open
Raj007Patel opened this issue Dec 26, 2024 · 8 comments
Open

Error- IPython is not defined #2

Raj007Patel opened this issue Dec 26, 2024 · 8 comments

Comments

@Raj007Patel
Copy link

Hello there,
First of all thank you so much for all the help in Bayes_drt.

I have set up new environment for bayes_drt2 as instructed. sucessfully downloaded.
now when i am executing the code, the error, " Javascript Error: IPython is not defined" comes.

i have install necessary IPython package also by using "pip install --upgrade ipython" in notebook as well as using conda in conda prompt. still experiencing this error.

suggest some solutions.

Thank you.

@jdhuang-csm
Copy link
Owner

Can you provide the cell/code that raises this error? A screenshot would be fine.

@Raj007Patel
Copy link
Author

Raj007Patel commented Dec 26, 2024

Thank you for you reply and apologies.

here is a screenshot,
There is not any issue with file uploading whatsoever.

Screenshot 2024-12-21 101205

@jdhuang-csm
Copy link
Owner

Ok, that's good. This error seems to be related only to interactive plotting in Jupyter Notebook; see this thread: https://stackoverflow.com/questions/51922480/javascript-error-ipython-is-not-defined-in-jupyterlab

In the first cell of the tutorial notebook, please try changing the line %matplotlib notebook to %matplotlib inline. You may need to restart the kernel for the change to take effect. If this fixes the issue, then you can simply use the non-interactive inline plotting (inline) instead of interactive plotting (notebook) as a workaround. This isn't a bayes_drt issue but rather a Jupyer issue; you can probably get the interactive plotting working by checking the StackOverflow answers linked above.

@Raj007Patel
Copy link
Author

hello,

first of all, Thank you very much for your responses. they are of big help.

I am now able to access some of the codes by using bayes_drt2

But still i am having problems when I run,

  1. Detailed DDT recovery walkthrough tutorials where we need eis_utils file

  2. bayes_drt_20201113 file also this one too.

i really appreciate your efforts.
Please provide solution for this.
I am also actively trying to run bayes_drt by downloading Microsoft visual studio.

thank you.

@jdhuang-csm
Copy link
Owner

I've updated the DDT walkthrough to reflect the current module organization, which no longer includes the old eis_utils module.

bayes_drt_20201113 is a static copy of the package at time of the original paper's publication to ensure that the figures can be reproduced. Unfortunately, you will need to install pystan to use this version of the package. However, you should be able to run the code to generate the original figures using bayes_drt2 - you just need to replace any usage of the obsolete eis_utils module with either the currentt plotting or file_load modules, depending on which function is called.

@Raj007Patel
Copy link
Author

hello there,

Thank you so much all the efforts and apologies If I am asking too much.

I tried the modifications and got some error. I am attaching the pdf file, kindly go through this.

(5). Detailed DDT recovery walkthrough.pdf

And also I want to perform DRT of data with all the methods simultaneously,
and DRT-TpDDT and DRT-BpDDT of my data.

will it be possible using bayes_drt2?
or else I have to go for pystan?

I have tried all the version of MVSC 2022,2019,2017,2015, in order to access bayes_drt, the same error is arising, "MVSC is not supported."

Please help.
Thank you again for all these.

@jdhuang-csm
Copy link
Owner

Hi, sorry for the delayed reply. I need some time to work through the errors shown in the PDF. Sorry that those popped up; some are definitely bugs, while others may be related to a change in cmdstanpy versions.

bayes_drt2 has all the same functionality as bayes_drt. You can use it to fit a multi-distribution model consisting of the DRT and DDT in series. However, the a model including the DRT and a transmissive DDT becomes degenerate, as both types of distribution can describe the same impedance features.

@jdhuang-csm
Copy link
Owner

Hi there, I fixed a couple minor things that were causing the errors in the tutorial. However, I wasn't able to reproduce the non-fatal cmdstan error that appeared in your notebook - this might simply be due to a version difference. Please let me know if the results that you get when running the DDT example match what's displayed in the notebook on GitHub. If so, I can set a version requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants