On Oct 4, 2010, at 1:12 PM, Dane Springmeyer wrote:

> 
> On Oct 4, 2010, at 11:26 AM, jeff2 wrote:
> 
>> File "C:\Python25\lib\urllib2.py", line 1134, in unknown_open
>>   raise URLError('unknown url type: %s' % type)
>> urllib2.URLError: <urlopen error unknown url type: c>
> 
> urllib.urlopen does not work on Windows with absolute paths unless the path 
> is prefixed with 'file:path/to/something.png'
> 
> I fixed this problem in Cascadenik a while back but I assume this got lost in 
> recent refactoring.
> 
> The fix was part of:
> 
> http://code.google.com/p/mapnik-utils/source/detail?r=900
> 
> and was basically:
> 
> +         if os.path.exists(src): # local file
> +             # using 'file:' enables support on win32
> +             # for opening local files with urllib.urlopen
> +             # Note: this must only be used with abs paths to local files
> +             # otherwise urllib will think they are absolute,
> +             # therefore in the future it will likely be
> +             # wiser to just open local files with open()
> +             if os.path.isabs(src) and sys.platform == "win32":
> +                 src = 'file:%s' % src
> 
> So, basically Jeff, my guess is that Cascadenik HEAD is currently not 
> compatible with windows, but it should be a fairly easy fix.


Cascadenik HEAD is a bit busted at the moment, sorry. We merged Robert's 
changes in, realized that they left us with non-working datasources, and 
quickly threw in the "classic" branch on Github to temporarily fix it. I've 
been working with Dane, Robert, and Nino on a new Cascadenik release so I'm 
sorry that things are a bit out of sorts at the moment.

Jeff, where did you get your copy of Cascadenik from?

-mike.

----------------------------------------------------------------
michal migurski- [email protected]
                 415.558.1610



_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to