histograph / config

Histograph configuration
http://histograph.io
MIT License
0 stars 3 forks source link

Weird "Can't open configuration file [/path/to/config.yml]" error message #5

Closed reinvantveer closed 8 years ago

reinvantveer commented 8 years ago

reinv@lingui:~/data/Github/histograph$ histograph-import Can't open configuration file /home/reinv/data/Github/histograph/config/config.yml

reinv@lingui:~/data/Github/histograph$ cat /home/reinv/data/Github/histograph/config/config.yml

api: # API and IO options (http://github.com/histograph/api
bindHost: 0.0.0.0 # and http://github.com/histograph/io)
bindPort: 3001
baseUrl: http://localhost:3001
defaultPathRelation: hg:liesIn # Default relation that is used to solve combined
# queries, e.g. 'hoorn, friesland'
exampleUrls:
- "/search?q=albrechtlaan"
- "/search?uri=http://vocab.getty.edu/tgn/7003626"
- "/search?id=tgn/7264385"
- "/search?q=almelo&dataset=tgn"

(etc. etc.)

reinv@lingui:~/data/Github/histograph/config$ echo $HISTOGRAPH_CONFIG /home/reinv/data/Github/histograph/config/config.yml reinv@lingui:~/data/Github/histograph/config$ cat $HISTOGRAPH_CONFIG

api:                                        # API and IO options (http://github.com/histograph/api
  bindHost: 0.0.0.0                         #   and http://github.com/histograph/io)
  bindPort: 3001
  baseUrl: http://localhost:3001
  defaultPathRelation: hg:liesIn            # Default relation that is used to solve combined
                                            #   queries, e.g. 'hoorn, friesland'
  exampleUrls:
    - "/search?q=albrechtlaan"
    - "/search?uri=http://vocab.getty.edu/tgn/7003626"
    - "/search?id=tgn/7264385"
    - "/search?q=almelo&dataset=tgn"
    - "/datasets"
    - "/datasets/geonames"
    - "/ontology"
    - "/schemas/pits"
    - "/schemas/relations"
    - "/stats/queue"
    - "/stats/queries"
    - "/stats/queries/types-per-dataset"
    - "/search?q=hezingen"
    - "/search?name=hoorn&type=hg:Municipality"
    - "/search?name=amsterdam&related=hg:liesIn&related.q=drenthe"
    - "/search?q=amsterdam,drenthe"
    - "/search?q=nymegen&before=1600"
    - "/search?q=hoorn&intersects={%22type%22:%22Polygon%22,%22coordinates%22:[[[4.7316,53.0150],[4.7316,53.0310],[4.7766,53.0310],[4.77664,53.0150],[4.7316,53.0150]]]}"

(etc. etc.)

reinvantveer commented 8 years ago

Turns out to be a yaml parse error due to minor cock up by yours truly. There should be a bit better informed error message, though, like:

YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 38, column 3:
reinvantveer commented 8 years ago

Added pull request https://github.com/histograph/config/pull/6

bertspaan commented 8 years ago

Merged.