Closed PrasadSJ closed 2 years ago
import gnome.scripting as gs Traceback (most recent call last): File "
", line 1, in File "D:\sjppython\PyGnome\py_gnome\gnome__init.py", line 136, in from . import (environment, File "D:\sjppython\PyGnome\py_gnome\gnome\environment__init.py", line 5, in init_.py)**from .environment import Environment, env_from_netCDF, ice_env_from_netCDF File "D:\sjppython\PyGnome\py_gnome\gnome\environment\environment.py", line 17, in init__.py", line 19, infrom gnome.persist import base_schema File "D:\sjppython\PyGnome\py_gnome\gnome\persist\ from .extend_colander import (TupleSchema, SequenceSchema, SchemaNode, File "D:\sjppython\PyGnome\py_gnome\gnome\persist\extend_colander.py", line 14, in import gnome.basic_types File "D:\sjppython\PyGnome\py_gnome\gnome\basic_types.py", line 24, in from .cy_gnome import cy_basictypes as cbt **ImportError: cannot import name 'cy_basic_types' from 'gnome.cy_gnome' (D:\sjppython\PyGnome\py_gnome\gnome\cy_gnome\
This error means that PYGNOME was not built and installed correctly.
Or it was installed into a different environment than the one you are running in.
Things to look for:
1) do not use the current working directory where the gnome code is (py_gnome dir) -- Python will then try to use the source, rather than an installed version.
2) make sure you have built, installed, and run all in the same environment.
3) start the build / install process again, from scratch:
first run:
python setup.py cleanall
then:
python setup.py install
or
python seetup.py develop
you will get warnings, but if if you get an error, report back here.
Thanks Dr.Chris. I could able to compile it successfully now. I need to run the setup.py using my netcdf files of my study region. whether this pygnome is coupled with ADIOS_DB, so that i can get weathering output also. Kindly suggest
In order to run weathering with PyGNOME, you need:
1) the adios_db package, which can be found here:
https://github.com/NOAA-ORR-ERD/adios_oil_database/tree/production/adios_db
2) An oil record in JSON format, which can be downloaded from:
adios.orr.noaa.gov
or
Directly accessed from this gitHub repo:
https://github.com/NOAA-ORR-ERD/noaa-oil-data
An examples for using it can be found here:
1.cannot import name 'cy_basic_types' from 'gnome.cy_gnome'
===================================================================================== short test summary info ======================================================================================
FAILED test_ucode_filenames.py::test_ucode_char_in_grid_mover_filename[mover_test0] - OSError: GridCurrentMover_c.TextRead returned an error.
FAILED test_ucode_filenames.py::test_ucode_char_in_grid_mover_filename[mover_test1] - OSError: GridWindMover_c.TextRead returned an error.
FAILED test_ucode_filenames.py::test_ucode_char_in_grid_mover_filename[mover_test2] - OSError: GridCurrentMover_c.TextRead returned an error.
FAILED test_environment\test_filegridcurrent.py::test_gridcur_in_model - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\sjppy...
FAILED test_environment\test_gridcur.py::test_in_model - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\sjppython\PyGnome\p...
FAILED test_outputters\test_renderer.py::test_animation_in_model - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\sjppython\...
==================================================== 6 failed, 1282 passed, 59 skipped, 23 xfailed, 2 xpassed, 74 warnings in 272.10s (0:04:32) ====================================================
Error opening NetCDF fileError opening NetCDF fileError opening NetCDF file
please advise