Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
craigmillernz opened this issue Feb 9, 2024 · 1 comment

Comments

@craigmillernz
Copy link

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.
Copy link

github-actions bot commented Feb 9, 2024

JIRA issue [GEOPY-1347] was created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant