c-h-david / rrr Goto Github PK
View Code? Open in Web Editor NEWReproducible Routing Rituals (RRR)
License: Other
Reproducible Routing Rituals (RRR)
License: Other
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!
@kandread, would you be able to implement this modification?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.