MiraGeoscience / geoapps

Some applications, mostly in Python, using solutions from Mira Geoscience
MIT License
55 stars 12 forks source link

Geoapps export app gives NotImplementedError: TreeMesh.writeUBC has been removed, please use TreeMesh.write_UBC. #660

Open craigmillernz opened 5 months ago

craigmillernz commented 5 months ago

Version 0.11.0 When trying to export a model to UBC msh/mod format i get this "removed" error.


---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
File D:\Dropbox\geoapps_11\geoapps\export\application.py:357, in Export.trigger_click(self, _)
    354     self._export_geotiff(entity)
    356 elif self.file_type.value == "UBC format":
--> 357     self._export_ubc(entity, data_values)

File D:\Dropbox\geoapps_11\geoapps\export\application.py:294, in Export._export_ubc(self, entity, data_values)
    285     models[
    286         str(
    287             Path(self.export_directory.selected_path) / self.export_as.value
   (...)
    291         + ".mod"
    292     ] = item[ind]
    293 name = f"{Path(self.export_directory.selected_path) / self.export_as.value}.msh"
--> 294 mesh.writeUBC(
    295     name,
    296     models=models,
    297 )
    298 print(f"Mesh saved to {name}")
    299 print(f"Models saved to {list(models)}")

File ~\AppData\Local\miniforge3\envs\geoapps\lib\site-packages\discretize\utils\code_utils.py:306, in deprecate_method.<locals>.new_method(self, *args, **kwargs)
    301 message = (
    302     f"{class_name}.{old_name} has been deprecated, please use "
    303     f"{class_name}.{new_name}.{tag}"
    304 )
    305 if error:
--> 306     raise NotImplementedError(message.replace("deprecated", "removed"))
    307 else:
    308     warnings.warn(
    309         message,
    310         warn,
    311         stacklevel=2,
    312     )

NotImplementedError: TreeMesh.writeUBC has been removed, please use TreeMesh.write_UBC.
github-actions[bot] commented 5 months ago

JIRA issue [GEOPY-1347] was created.