[Tutor] Break stament issue
Steven D'Aprano
steve at pearwood.info
Sat Jun 18 06:29:58 CEST 2011
Susana Iraiis Delgado Rodriguez wrote:
> Hello members!!
>
> Steven, I already changed the settings in the IDE to avoid the trouble when
> I type the code.
> In the other hand I added the pass statement so the script keep working even
> though it finds an error, but the scripts ignore the pass statement. Console
> prints:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "mapnik_punto_sin_duda.py", line 44, in <module>
> lyr.datasource = mapnik.Shapefile(base=ruta,file=archivo[0])
> File "C:\mapnik-0.7.1\python\2.6\site-packages\mapnik\__init__.py", line
> 282,
> in Shapefile
> return CreateDatasource(keywords)
> RuntimeError: wrong file code : -1997790976
This looks like an internal error of mapnik. I know nothing about
mapnik, but my wild guess is that it expects a filename and you are
giving it something else? Or the wrong filename? Or maybe it expects an
open file, and you have given it a filename?
--
Steven
More information about the Tutor
mailing list