Giter Site home page Giter Site logo

rrr's People

Contributors

alexlim-pro avatar c-h-david avatar efluet avatar geoallen avatar jayyysiri avatar jswade avatar kcotar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rrr's Issues

rrr_cat_tot_gen_one_nhdplus.py DbfError

I have installed rrr and rapid with docker (on a Windows 10 computer) and am trying to prepare input files. Specifically, I'm trying to prepare the csv file from an NHDPlus catchment file using rrr_cat_tot_gen_one_nhdplus.py. I copied the files from my local computer to the docker container using the following commands:

# HUC10_catch = catchment shapefile
docker cp HUC10_catch.dbf <container ID>:/home/rrr/src/HUC10_catch.dbf
docker cp HUC10_catch.shp <container ID>:/home/rrr/src/HUC10_catch.shp
docker cp HUC10_catch.shx <container ID>:/home/rrr/src/HUC10_catch.shx

Next, I tried running the the rrr_cat_tot_gen_one_nhdplus python script using the following command:

docker exec <container ID> python /home/rrr/src/rrr_cat_tot_gen_one_nhdplus.py /home/rrr/src/HUC10_catch.dbf /home/rrr/src/rapid_catchment_HUC10.csv

And the following error is thrown:

Traceback (most recent call last):
  File "/home/rrr/src/rrr_cat_tot_gen_one_nhdplus.py", line 74, in <module>
    nhd_cat_dbf=dbf.Table(nhd_cat_file)
  File "/usr/local/lib/python2.7/dist-packages/dbf/ver_2.py", line 4870, in __new__
Command line inputs
- /home/rrr/src/HUC10_catch.dbf
- /home/rrr/src/rapid_catchment_HUC10.csv
Read shapefile
- Read attributes
    possibles = guess_table_type(filename)
  File "/usr/local/lib/python2.7/dist-packages/dbf/ver_2.py", line 8052, in guess_table_type
    reported = table_type(filename)
  File "/usr/local/lib/python2.7/dist-packages/dbf/ver_2.py", line 8081, in table_type
    raise DbfError("Unknown dbf type: %s (%x)" % (version, ord(version)))
dbf.ver_2.DbfError: Unknown dbf type:   (0)

I looked at the table_type documentation and the version_map documentation and discovered that it seems to not be recognizing the dbf version correctly, therefore throwing the DbfError. In order to debug locally, I created a conda environment on my computer to run the dbf.Table(nhd_cat_file) command, which did not throw any errors. In addition, when I run the following code in the conda environment, it seems that the dbf file version matches one of the versions in the version_map documentation.

>> fd = open('HUC10_catch.dbf')
>> version = fd.read(1)
>> version
'\x03'

Any idea why the issue seems to only exist in the docker container? I am new to using docker, so please let me know if I'm doing something wrong.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.