Python gdb.read_channel error

EdwardBiegert
EdwardBiegert Posts: 4 Calcite Rank Badge
edited February 2023 in GeoStudio
I updated some files to resolve some scipy.linalg issues and now my simple, old code that used to work no longer runs. The code creates a Geosoft context, prints out the geosoft userid, opens a Geosoft data base, and reads data from a channel. It now fails at this line: X_data, fid = gdb.read_channel(line, 'X_WGS84_UTM10N')

Errors are listed below. How can I resolve this problem?

I had done a conda update --all and then after my geosoft code failed to execute, I uninstalled geosoft and then reinstalled using --no-cache-dir to force a new download in case the file was somehow corrupted.
Now running Python 3.7.2


Error Output:

C:\ProgramData\Anaconda3\python.exe C:/Users/EKB/PycharmProjects/Test_Project/GX_GDB_Line_Orientation.py

biegert@alumni.rice.edu
Traceback (most recent call last):
File "C:/Users/EKB/PycharmProjects/Test_Project/GX_GDB_Line_Orientation.py", line 28, in
X_data, fid = gdb.read_channel(line, 'X_WGS84_UTM10N') # Obtain coordinates of points on the line
File "c:\programdata\anaconda3\lib\site-packages\geosoft\gxpy\gdb.py", line 1520, in read_channel
return vv.get_data(vv.dtype)[0], vv.fid
File "c:\programdata\anaconda3\lib\site-packages\geosoft\gxpy\vv.py", line 412, in get_data
npd = self._get_data_np(start, n, dtype)
File "c:\programdata\anaconda3\lib\site-packages\geosoft\gxpy\vv.py", line 251, in _get_data_np
npd.flags['WRITEABLE'] = True
ValueError: cannot set WRITEABLE flag to True of this array

Process finished with exit code 1



Geosoft install seems to have gone without incident:


(base) C:\Users\EKB>pip install --no-cache-dir geosoft
Collecting geosoft
Downloading https://files.pythonhosted.org/packages/9d/79/852eaf0dc5910c9016fe7898b8140098bd4f66ae4a917af09ee41d84cf3d/geosoft-9.5.0-cp37-none-win_amd64.whl (4.4MB)
100% |████████████████████████████████| 4.4MB 6.7MB/s
Requirement already satisfied: requests in c:\programdata\anaconda3\lib\site-packages (from geosoft) (2.21.0)
Requirement already satisfied: pandas in c:\programdata\anaconda3\lib\site-packages (from geosoft) (0.24.1)
Requirement already satisfied: numpy in c:\programdata\anaconda3\lib\site-packages (from geosoft) (1.16.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\programdata\anaconda3\lib\site-packages (from requests->geosoft) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\lib\site-packages (from requests->geosoft) (2018.11.29)
Requirement already satisfied: idna<2.9,>=2.5 in c:\programdata\anaconda3\lib\site-packages (from requests->geosoft) (2.8)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\programdata\anaconda3\lib\site-packages (from requests->geosoft) (1.24.1)
Requirement already satisfied: python-dateutil>=2.5.0 in c:\programdata\anaconda3\lib\site-packages (from pandas->geosoft) (2.7.5)
Requirement already satisfied: pytz>=2011k in c:\programdata\anaconda3\lib\site-packages (from pandas->geosoft) (2018.9)
Requirement already satisfied: six>=1.5 in c:\programdata\anaconda3\lib\site-packages (from python-dateutil>=2.5.0->pandas->geosoft) (1.12.0)
Installing collected packages: geosoft
Successfully installed geosoft-9.5.0
Tagged:

Comments

This discussion has been closed.