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
Plotter does not render after Pandas.read_excel() is called in a Jupyter notebook #5895
Comments
I've not contributed to PyVista before. But if it's helpful, I'm happy to take a crack at it if someone can point me in the right direction. |
that's super weird. It looks like |
Looks like it may be related to the |
I also called the imports from the openpyxl
Calling any one of these imports was sufficient sufficient to reproduce the issue. |
I think any sort of |
works fine with |
I'm at a loss. It doesn't seem like openpyxl is really importing anything that could do this. What version of openpyxl do you have? I just installed 3.1.2 and am unable to replicate. |
That's really weird. |
Are you using the notebook backend @darikg? I created a new environment from scratch, and it does work with just |
I wondered if it was maybe related to me using a Notebook inside VSCode. I opened the notebook in Chrome and that didn't fix it either. |
Yeah, in a new Windows python 3.11 environment, pip install -r bug_requirements.txt, jupyter lab in chrome, import openpyxl
from pyvista import Sphere
Sphere().plot() works fine 😕 |
What if you swap the import order? I have typically been importing openpyxl after pyvista. |
I just ran your code and was still encountering this bug. So I guess the order doesn't matter for me. So strange. My Python version in this environment is 3.12.2. Otherwise I'm totally at a loss... |
just checked python 3.12.2 for completeness' sake, and it's fine regardless of import order. you're on windows too? i'm willing to blame some sort of poltergeist at this point |
Yeah Windows 10. Weird that I consistently have the issue in fresh environments. Maybe my anaconda installation is a bit messed up. Anyways if no one else can replicate it guess we should leave it alone for now. |
Yeah sorry! I'm really curious what's causing this but don't have any ideas for further isolating it. |
Describe the bug, what's wrong, and what you expected.
I was having difficulty getting a plot to show up inside a Jupyter notebook. The pyvista plotter was infinitely stuck on the loading message. I traced this back to using
pd.read_excel()
before trying to plot something. Commenting this out and restarting the kernel resolved the issue. I tried usingpd.read_csv()
andpd.read_excel()
with an.xls
file and it worked fine. It seems that the problem is restricted to the loading of.xlsx
files.The pandas version is 1.5.3
Steps to reproduce the bug.
This code must be run in a Jupyter notebook. It will not result in bugged behavior for a Python file.
System Information
Screenshots
The text was updated successfully, but these errors were encountered: