schism-dev / pyschism

Python interface for handling the SCHISM model.
https://schism-dev.github.io/schism/master/getting-started/pre-processing-with-pyschism/overview.html
Apache License 2.0
23 stars 18 forks source link

AssertionError Problems #117

Open hb-9797 opened 5 months ago

hb-9797 commented 5 months ago

Hi, sir I meet a problem similar to issues"21"and"22“(https://github.com/schism-dev/pyschism/issues/21)。And install new packages as per reply 22(”conda install -c nesii -c conda-forge esmpy“)。 However, when I debug the programme, the same error is still reported. How to solve the problem?

  1. Test code image
  2. Error image
SorooshMani-NOAA commented 5 months ago

Hi @hb-9797, can you please execute conda list in your environment and paste the result here? I also noticed you're using pyschism on Windows, can you try it on a Linux platform and see if you run into the same issue? e.g. on WSL on Windows. I just tested installing it on my WSL2 using:

$ conda create -c conda-forge -n my_pyschism_env python=3.10 udunits2 cfdm cfunits
$ conda activate my_pyschism_env
$ pip install pyschism
$ python
>>> import pyschism

without any issues

hb-9797 commented 5 months ago

Thanks for the reply, here is my conda list, "udunits2 cfdm cfunits" all three libraries are installed, I have not used them on Linux before, will try next. image image image

SorooshMani-NOAA commented 5 months ago

I have this in my WSL environment (I create this environment from scratch with Python version matching yours) and it does not crash for me:

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
annotated-types           0.6.0                    pypi_0    pypi
anyio                     4.2.0                    pypi_0    pypi
appdirs                   1.4.4                    pypi_0    pypi
asciitree                 0.3.3                    pypi_0    pypi
attrs                     23.2.0                   pypi_0    pypi
beautifulsoup4            4.12.3                   pypi_0    pypi
blosc                     1.21.5               h0f2a231_0    conda-forge
boto3                     1.34.25                  pypi_0    pypi
botocore                  1.34.25                  pypi_0    pypi
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.25.0               hd590300_0    conda-forge
ca-certificates           2023.11.17           hbcca054_0    conda-forge
cdsapi                    0.6.1                    pypi_0    pypi
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cf-python                 3.16.0                   pypi_0    pypi
cfdm                      1.11.0.0         py39hf3d152e_0    conda-forge
cffi                      1.16.0                   pypi_0    pypi
cfgrib                    0.9.10.4                 pypi_0    pypi
cftime                    1.6.3            py39h44dd56e_0    conda-forge
cfunits                   3.3.6              pyhd8ed1ab_0    conda-forge
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
click-plugins             1.1.1                    pypi_0    pypi
cligj                     0.7.2                    pypi_0    pypi
cloudpickle               3.0.0                    pypi_0    pypi
contourpy                 1.2.0                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
dask                      2024.1.0                 pypi_0    pypi
dataretrieval             1.0.6                    pypi_0    pypi
deprecated                1.2.14                   pypi_0    pypi
eccodes                   1.6.1                    pypi_0    pypi
erddapy                   2.2.0                    pypi_0    pypi
exceptiongroup            1.2.0                    pypi_0    pypi
f90nml                    1.4.4                    pypi_0    pypi
fasteners                 0.19                     pypi_0    pypi
findlibs                  0.0.5                    pypi_0    pypi
fiona                     1.9.5                    pypi_0    pypi
fonttools                 4.47.2                   pypi_0    pypi
fsspec                    2023.12.2                pypi_0    pypi
geopandas                 0.14.2                   pypi_0    pypi
greenlet                  3.0.3                    pypi_0    pypi
h11                       0.14.0                   pypi_0    pypi
hdf4                      4.2.15               h2a13503_7    conda-forge
hdf5                      1.14.3          nompi_h4f84152_100    conda-forge
html5lib                  1.1                      pypi_0    pypi
httpcore                  1.0.2                    pypi_0    pypi
httpx                     0.26.0                   pypi_0    pypi
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.6                      pypi_0    pypi
importlib-metadata        7.0.1                    pypi_0    pypi
importlib-resources       6.1.1                    pypi_0    pypi
jmespath                  1.0.1                    pypi_0    pypi
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5                    pypi_0    pypi
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libblas                   3.9.0           21_linux64_openblas    conda-forge
libcblas                  3.9.0           21_linux64_openblas    conda-forge
libcurl                   8.5.0                hca28451_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_3    conda-forge
libgfortran-ng            13.2.0               h69a702a_3    conda-forge
libgfortran5              13.2.0               ha4646dd_3    conda-forge
libgomp                   13.2.0               h807b86a_3    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           21_linux64_openblas    conda-forge
libnetcdf                 4.9.2           nompi_h80fb2b6_111    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenblas               0.3.26          pthreads_h413a1c8_0    conda-forge
libsqlite                 3.44.2               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_3    conda-forge
libudunits2               2.2.28               h40f5838_3    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxml2                   2.12.4               h232c23b_1    conda-forge
libzip                    1.10.1               h2629f0a_3    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
limits                    3.7.0                    pypi_0    pypi
llvmlite                  0.41.1                   pypi_0    pypi
locket                    1.0.0                    pypi_0    pypi
lxml                      5.1.0                    pypi_0    pypi
lz4-c                     1.9.4                hcb278e6_0    conda-forge
matplotlib                3.8.2                    pypi_0    pypi
metpy                     1.6.1                    pypi_0    pypi
ncurses                   6.4                  h59595ed_2    conda-forge
netcdf-flattener          1.2.0              pyh9f0ad1d_0    conda-forge
netcdf4                   1.6.5           nompi_py39h4282601_100    conda-forge
numba                     0.58.1                   pypi_0    pypi
numcodecs                 0.12.1                   pypi_0    pypi
numpy                     1.26.3           py39h474f0d3_0    conda-forge
openssl                   3.2.0                hd590300_1    conda-forge
ordered-set               4.1.0                    pypi_0    pypi
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.2.0                    pypi_0    pypi
partd                     1.4.1                    pypi_0    pypi
pillow                    10.2.0                   pypi_0    pypi
pint                      0.23                     pypi_0    pypi
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
platformdirs              4.1.0                    pypi_0    pypi
pooch                     1.8.0                    pypi_0    pypi
psutil                    5.9.8                    pypi_0    pypi
pycparser                 2.21                     pypi_0    pypi
pydantic                  2.5.3                    pypi_0    pypi
pydantic-core             2.14.6                   pypi_0    pypi
pygeos                    0.14                     pypi_0    pypi
pylib-essentials          0.0.6                    pypi_0    pypi
pyparsing                 3.1.1                    pypi_0    pypi
pyproj                    3.6.1                    pypi_0    pypi
pyschism                  0.1.15                   pypi_0    pypi
python                    3.9.18          h0755675_1_cpython    conda-forge
python-dateutil           2.8.2                    pypi_0    pypi
python_abi                3.9                      4_cp39    conda-forge
pytz                      2023.3.post1             pypi_0    pypi
pyugrid                   0.3.1                    pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
readline                  8.2                  h8228510_1    conda-forge
requests                  2.31.0                   pypi_0    pypi
rtree                     1.2.0                    pypi_0    pypi
s3transfer                0.10.0                   pypi_0    pypi
scipy                     1.12.0           py39h474f0d3_1    conda-forge
searvey                   0.3.11                   pypi_0    pypi
seawater                  3.3.4                    pypi_0    pypi
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
shapely                   2.0.2                    pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
snappy                    1.1.10               h9fff704_0    conda-forge
sniffio                   1.3.0                    pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
sqlalchemy                2.0.25                   pypi_0    pypi
stormevents               2.2.2                    pypi_0    pypi
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toolz                     0.12.0                   pypi_0    pypi
tqdm                      4.66.1                   pypi_0    pypi
tqdm-logging-wrapper      1.0.1                    pypi_0    pypi
traitlets                 5.14.1                   pypi_0    pypi
typepigeon                1.1.1                    pypi_0    pypi
typing-extensions         4.9.0                    pypi_0    pypi
tzdata                    2023.4                   pypi_0    pypi
udunits2                  2.2.28               h40f5838_3    conda-forge
urllib3                   1.26.18                  pypi_0    pypi
utm                       0.7.0                    pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
wget                      3.2                      pypi_0    pypi
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
wrapt                     1.16.0                   pypi_0    pypi
xarray                    2024.1.0                 pypi_0    pypi
xmltodict                 0.13.0                   pypi_0    pypi
xz                        5.2.6                h166bdaf_0    conda-forge
zarr                      2.16.1                   pypi_0    pypi
zipp                      3.17.0                   pypi_0    pypi
zstd                      1.5.5                hfc55251_0    conda-forge

Specifically for cf-python, cfdm, cfunits, udunits2 it seems to match your versions. The only difference is from the build. Maybe that's an issues with Windows. I don't have a Windows environment to test it on, if you can, please test on your Windows WSL and see if you see the same issue.