Order bot - conflict

Hi , I have a compatibility issue when executing the import panel cell.
ImportError: cannot import name ‘warn’ from 'bokeh.util.warnings
following on from this I can not find working versions of boke and Jupyter Notebook in Visual Studio Codde and receive this error when trying to change versions in Python. ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
panel 0.14.4 requires bokeh<2.5.0,>=2.4.0, but you have bokeh 3.1.0 which is incompatible.
Can you please list the required modules to install for this course, I hav stumbled on quite a few when exeuting cells, but may not have the best versions. Thank you.

HI @Jus_St , could you please share your code with me? don’t forget to remove your api key.

I’d like to test what you are doing in my environment.

Thanks,

Juan

Actually I have created the bot in my environment and I am getting the same issue as you.

I have created a quick version replacing panel and bokeh with streamlit. It is still not behaving as the original one as it restarts after the 3rd question, but at least I am seeing something. I will continue working on my version to see if I can make it work as the original. In case I make it happen, I’ll share the code with you.

Just wanted to let you know that I am seeing the same issue, which is an incompatibility between ‘panel’, ‘jupyter_bokeh’, and ‘bokeh’. I also wanted to share that I am working on a version that replaces those libraries with streamlit.

Thanks,

Juan

1 Like

Hi Juan, thanks for taking the time to look at this issue. Just to recap I have loaded the original files directly into a Visual Studio Code environment. All previous setions have worked although I have needed to install various packages using PIP. The errors in orderbot begin to surface with lots of yellow error lines in the first cell of the orderbot section. Hovering over these warnings indicates that the inp, contextand panels variables are “not defined by pylance” but the cell still runs withinin the Jupyter Notebook with a green tick outcome and no erros in the terminal output.

The breakdown happens in the next cell where the import error is ImportError: cannot import name ‘warn’ from ‘bokeh.util.warnings’.
SInce the previous errors Ivhad were all resolved with pip installs, this is all I have tried. To my knowledge I have not modified the code at all. It is the file I saved from downloading the original.
the main error message in terminal output is ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
panel 0.14.4 requires bokeh<2.5.0,>=2.4.0, but you have bokeh 3.1.0 which is incompatible.

Packages installed include, redlines 0.2.2, scikit-learn 1.2.2, bokeh 3.1.0 (have tried 2.4 also),jupyter-bokeh 3.0…7

The subsequent cell, producing the json summary works without errors.

(I do recall seeing size limit warnings as errors also, but these no longer show up)

Your feedback is most welcome, thanks again, J

1 Like

Hi @Jus_St , yes, all these errors you mention are pretty much what I am getting when using the ‘panel’ and ‘bokeh’ libraries. I tried for a while to find the right combination with panel and bokeh but could not make it work. That’s why I am exploring this other option using another library.

The ‘panel’ and ‘bokeh’ libraries are only for UI, and not for the actual bot ‘intelligence’. So what we need to change is the UI layer, making sure that it feeds the bot as it needs it. I have made some improvements in my version but still have to work it a bit more.

I’ll share here if I make it work as expected.

1 Like

Hi @Jus_St , following up on this, I have a working version of the bot using streamlit library. You can get it from HERE.

I hope this helps you enhance your knowledge and practice of this mini course on ChatGPT Prompt Engineering for Developers.

If you have any question, don’t hesitate to contact me here.

Thanks,

Juan

Thank very much - I will try out your code… the course has been very interesting and well presented , your code will hopefully complete this. Well done, happy coding!

1 Like