Bug in gxpy.gdb
I noticed that geosoft.gxpy.gdb.read_line() does not work properly on 9.3. It makes the application crash. I had to revert to 9.2 and everything works properly. I am using Python 3.5.2.
edited December 2017
, Please send a sample of the code that crashes if you can, and the symptoms of the crash. It would also be useful to have the database in case the problem is related to the database.
If you (or anyone) needs to debug things like this yourself you might find the gdb tests helpful. All the tests at
pass, and of course must pass for us to release. The tests have very high coverage, but it is possible that a particular database presents a situation we have not foreseen.
We really do not advise going back to an earlier version as it is better for us to get to the bottom of the issue, and we can likely provide an alternative approach. Once we can duplicate this problem we can fix it, or address the situation and add it to the tests, which improves the API for everyone.
Note that the benefit of read_line() is that it reads and resamples everything in a line, which may be appropriate for a simple database. There may be a problematic channel, so a better pattern is to read only the channels you want using read_channel() or read_channel_vv().
Thanks for your help.
In case people are following this thread. We have worked with Marc but we cannot yet duplicate his symptom, which occurs when running his script from inside PyCharm. Python exits prematurely reporting an unknown program error.
Please let us know if you have a similar problem.
for details about updating your Python Geosoft package.
Please find below some details about this bug. I am attaching image files of a simple application that mixes matplotlib, filedialog, and geosoft GX, like:
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import geosoft.gxpy as gxpy
import geosoft.gxpy.gdb as gxdb
from matplotlib.figure import Figure
import tkinter as Tk
from tkinter import filedialog
If I select the geosoft through a menu like:
gdbfilename = filedialog.askopenfilename(title="Select GDB",
filetypes=(("GBD files", "*.gdb"), ("all files", "*.*")))
the application does not run in Pycharm and give the Error message illustrated. Similarly, I have an error in Anaconda (see attached). However, if I simply replace the previous line by:
# gdbfilename = filedialog.askopenfilename(title="Select GDB",
# filetypes=(("GBD files", "*.gdb"), ("all files", "*.*")))
gdbfilename = "VTEM.gdb"
everything works ok like illustrated on the Correct output image.
I can provide the *.py and the *.gdb file on request. However, they are not accepted by this post.
Error from Anaconda.JPG
edited May 2018
when we looked at this some time ago it seemed to be a conflict between tkinter, Pycharm and Geosoft, and we have not been able to come back to this due to other priorities.
You do trigger a Geosoft assertion, based on the "Error from Anaconda.JPG" image. Please click the [Report] button and send this to my personal e-mail, which you have. This may give us an idea of a work-around strategy.
This seems to disappear with Geosoft 9.4.
This discussion has been closed.
It looks like you're new here. If you want to get involved, click one of these buttons!
Seequent Products & Software
Leapfrog Products & Software
Geosoft Products & Software
GeoStudio Products & Software