Closed SR-Roweb closed 3 years ago
To solve the I/O error
you would need to modify the output.py file from pynoddy.
Lines 193 to 236 need to be inside the with open(...)
Great, thank you!
Hi @Crimzo1, Have you tried the changes on issue #41? This solves the problems for me.
The error:
ValueError: 'lower left' is not a valid value for origin; supported values are 'upper', 'lower'
is a problem of the matplotlib version. Either downgrade or change the root code to replace all 'lower left'
to 'lower'
Try updating your master branch to the latest version since this is solved there.
Thanks I'll have a look, I changed the above before but received the integer error, might of missed something.
Hi @danielsk78 that's worked great, thank you very much!
Hi, I recently found pynoddy and I am struggling to plot sections of the data as done from notebook 1-Simulation. The following code is given:
N1.plot_section('y', figsize = (5,3))
This gives me the error:
IndexError: only integers, slices (
:), ellipsis (
...), numpy.newaxis (
None) and integer or boolean arrays are valid indices
I then add an integer
xslice = int(0.1*N1.nx)
N1.plot_section('y', position = xslice, figsize = (5,3))
To get the errorValueError: 'lower left' is not a valid value for origin; supported values are 'upper', 'lower'
or if 0.1 is changed to 1 thenIndexError: index 124 is out of bounds for axis 1 with size 94
orValueError: I/O operation on closed file.
The same with 3D plots, I always seem to getAssertionError: Incompatible cell data. 1 cell blocks, but 'triangle' has 59150 blocks.
The I/O error appears to come from the following: ~\Anaconda3\lib\site-packages\pynoddy-1.1-py3.8.egg\pynoddy\output.py in load_geology(self) 198 k = 0 199 self.block = np.ndarray((self.nx, self.ny, self.nz)) --> 200 for line in f.readlines(): 201 if line == '\n': 202 # next z-slice
Any help would be greatly appreciated.