You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running make in data/raw I get the following error:
Traceback (most recent call last): File "/Users/thomasgaskin/solar-power-mapping-data/data/raw/compile_osm_solar.py", line 471, in <module> parser.parse(infp) File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/expatreader.py", line 111, in parse xmlreader.IncrementalParser.parse(self, source) File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse self.feed(buffer) File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/expatreader.py", line 217, in feed self._parser.Parse(data, isFinal) File "/private/tmp/pythonA3.11-20231002-5215-1appux8/Python-3.11.6/Modules/pyexpat.c", line 470, in EndElement File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element self._cont_handler.endElement(name) File "/Users/thomasgaskin/solar-power-mapping-data/data/raw/compile_osm_solar.py", line 256, in endElement v = str(reduce(lambda a, b: a+b, map(int, v.split(';')))) # entries could be e.g. "7;5;2" and here we reduce them to a single integer sum ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ValueError: invalid literal for int() with base 10: ''make: *** [osm.csv] Error 1
The line responsible is l. 256,
v=str(reduce(lambdaa, b: a+b, map(int, v.split(';')))) # entries could be e.g. "7;5;2" and here we reduce them to a single integer sum
which fails for strings of the kind '52;'.
A simple fix would be to add something like
v=v[:-1] ifv[-1] ==';'elsev
above that line.
This is using all the most recent data given by the links in the README.
data/processed/pre-process-repd throws a ModuleNotFound error:
ModuleNotFoundError: No module named 'bng_to_latlon'
The correct import statement should be import bng_latlon
The text was updated successfully, but these errors were encountered:
Problems with installation
I encountered several issues when installing:
make
indata/raw
I get the following error:The line responsible is l. 256,
which fails for strings of the kind
'52;'
.A simple fix would be to add something like
above that line.
This is using all the most recent data given by the links in the README.
data/processed/pre-process-repd
throws aModuleNotFound
error:ModuleNotFoundError: No module named 'bng_to_latlon'
import bng_latlon
The text was updated successfully, but these errors were encountered: