It is looking for a local file on the filesystem. You are giving it a URL.

On Thu, Mar 6, 2014 at 4:29 PM, Emilio García-Pumarino Álvarez <
[email protected]> wrote:

> Hi!,
> I have a error when i want open a file by a geoip2 library (a library for
> geolocation IP from MaxMind DB).
>
> *When I input this:*
>
> *geoip2.database.Reader('http://localhost:6543/static/geoipdb/geolite2country.mmdb
> <http://localhost:6543/static/geoipdb/geolite2country.mmdb>')*
>
>
> *I get this error: *Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/geoip2/database.py",
> line 48, in __init__
>     self.db_reader = maxminddb.Reader(filename)
>   File
> "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/maxminddb/reader.py",
> line 37, in __init__
>     with open(database, 'r+b') as db_file:
> *FileNotFoundError: [Errno 2] No such file or directory:
> 'http://localhost:6543/static/geoipdb/geolite2country.mmdb
> <http://localhost:6543/static/geoipdb/geolite2country.mmdb>'*
>
> The curious thing about all this is that since the browser finds the
> file... :S
>
> Thanks!
>
> Best,
> Emilio
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
http://www.slinkp.com

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to