edinburghlivinglab / dds-notebooks

IPython Notebooks for Data, Design and Society
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

reading map in permssion denied error (NEW BUG) #22

Closed franciscovargas closed 8 years ago

franciscovargas commented 8 years ago

Permision denied when trying to open html file that yields the voronoi tessalation map. This was working on the previous build and is not working either because perviously it had more permision access when run ??? or folium has been updated ? its a very odd bug I am not sure.

---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
<ipython-input-3-24ee05bc4c92> in <module>()
     29 
     30 
---> 31 embed_cloropleth(fmap)

/opt/dds-notebooks/dds_lab/map_render.py in embed_cloropleth(map, path)
     35     This method should work for all maps (as long as they use relative urls).
     36     """
---> 37     map.create_map(path=path)
     38     os.popen("mv data.json build-data")
     39     os.popen("mv leaflet-dvf.markers.min.js build-data")

/usr/local/lib/python3.4/dist-packages/folium/folium.py in create_map(self, path, plugin_data_out, template)
   1114         self._build_map(template)
   1115 
-> 1116         with codecs.open(path, 'w', 'utf8') as f:
   1117             f.write(self.HTML)
   1118 

/usr/lib/python3.4/codecs.py in open(filename, mode, encoding, errors, buffering)
    889         # Force opening of the file in binary mode
    890         mode = mode + 'b'
--> 891     file = builtins.open(filename, mode, buffering)
    892     if encoding is None:
    893         return file

PermissionError: [Errno 13] Permission denied: 'build-data/map.html'

The directory does indeed exist, what do you think @gngdb ?

gngdb commented 8 years ago

Created this problem while I was testing the automatic notebook updating. Permissions got messed up for all users that hadn't signed in on the newest container. Ran a script to fix all the permissions. This should now be fixed.