Skip to content

Saving is messing up the file paths #152

Open

Description

I have a plot that uses a topojson file that is located in one directory and creates a chloropeth with data from a csv file located on another directory. I write whole path to both files in the function and the plot is produced without any problem. However, when I try to save it, the plot fails because the function apparently appends the working directory path to both the json and the csv, so they cannot be located anymore. This is the error I get.

ERROR Loading failed /mnt/data/PUR.jl/total2016_chlorantraniliprole.csv { [Error: ENOENT: no such file or directory, open '/mnt/data/PUR.jl//mnt/data/PUR.jl/total2016_chlorantraniliprole.csv']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '/mnt/data/PUR.jl//mnt/data/PUR.jl/total2016_chlorantraniliprole.csv' }
ERROR Loading failed /mnt/data/JuliaExamples/ca_counties.topo.json { [Error: ENOENT: no such file or directory, open '/mnt/data/PUR.jl//mnt/data/JuliaExamples/ca_counties.topo.json']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '/mnt/data/PUR.jl//mnt/data/JuliaExamples/ca_counties.topo.json' }

I can fix this by moving the files to the working directory, but that's really not a practical solution all the time. Why does that happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions