Comments (16)
that's super weird. It looks like read_excel
has an engine
option, and openpyxl
is used by default for xlsx files. Maybe check if just importing openpyxl without reading a file is enough to also break the plotter? Or check if the calamine
engine also breaks it?
from pyvista.
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 😕
from pyvista.
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.
from pyvista.
Looks like it may be related to the openpyxl
engine like you suspected. import openpyxl
is sufficient to reproduce the issue. Works fine with calamine
. I upgraded to pandas 2.2.2
and the issue persists.
from pyvista.
I also called the imports from the openpyxl __init__.py
individually.
from openpyxl.compat.numbers import NUMPY
from openpyxl.xml import DEFUSEDXML, LXML
from openpyxl.workbook import Workbook
from openpyxl.reader.excel import load_workbook as open
from openpyxl.reader.excel import load_workbook
import openpyxl._constants as constants
Calling any one of these imports was sufficient sufficient to reproduce the issue.
from pyvista.
I think any sort of from openpyxl import ...
is equivalent to import openpyxl
so it makes sense any one of those imports will cause the same problem. What about import lxml
?
from pyvista.
works fine with import lxml
from pyvista.
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.
from pyvista.
That's really weird.
from pyvista.
Are you using the notebook backend @darikg? I created a new environment from scratch, and it does work with just pip install pyvista openpyxl
. I get a warning saying that the notebook backend can't be used because trame
is not installed, so I think that plot is not interactive. When I did pip install pyvista[jupyter]
to get trame
and the other backend components for Jupyter, the bug reappeared. I've attached a file with the environment needed for the bug to appear on my machine (pip install pandas pyvista[jupyter]
).
from pyvista.
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.
from pyvista.
What if you swap the import order? I have typically been importing openpyxl after pyvista.
from 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...
from pyvista.
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
from pyvista.
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.
from pyvista.
Yeah sorry! I'm really curious what's causing this but don't have any ideas for further isolating it.
from pyvista.
Related Issues (20)
- how to stabilize rotation during interaction?
- Parallel projection spoils plot
- Error reading large VTK XLM-files ( e.g. vtu-files) HOT 3
- Crinkle Clip returns UnstructuredGrid instead of PolyData HOT 6
- `extract_points` and `extract_cells` modify input data arrays
- `PolyData` initializes verts as faces and does not raise error (and may crash Python) HOT 7
- Bug with non-default center and direction for capsule with VTK<9.3
- `cast_to_unstructured_grid` not working for `PointSet`
- Inconsistent rendering of ChartMPL plots HOT 2
- Plotting in Jupyter returns AttributeError: 'NoneType' object has no attribute 'has_capabilities' HOT 7
- Fix failing doc image tests HOT 3
- Need to fix warning of `tests/core/test_dataset_filters.py` HOT 2
- Error loading mesh while using Pyvista with vtk-egl HOT 4
- Point labels do not show properly in interactive documentation. HOT 3
- Opaque regions in RGBA images render partially transparent no matter what HOT 12
- UnstructuredGrid.clean modifies cell faces in-place HOT 1
- Fix `ImageData` transformations
- Connectivity filter crashes kernel, works on computers with older package/ python versions HOT 3
- Merging UnstructuredGrid with lines into another UnstructuredGrid HOT 9
- Error while using Pyvista with vtk-osmesa HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvista.