Open venantius opened 11 years ago
Hi, the problem is with http://user-agent-string.info/ which is providing the data. Since I'm often having similar problems, it would probably make sense to include data with the library.
Yeah, that would be nice. Dunno how you'd want to approach the cache size issue but including even a relatively small cache file with the library would be pretty swell.
Any update on alternatives or how to resolve this problem?
Any updates?
You can use http://data.udger.com/example/udgerdata_old.ini, eg.
>>> from uasparser2 import UASparser
>>> UASparser.ini_url = 'http://data.udger.com/example/udgerdata_old.ini'
>>> uasparser = UASparser(cache_dir='/tmp/')
Thanks, fido20, but I'm still getting an error:
Traceback (most recent call last):
File "<pyshell#8>", line 1, in
Also, the udgerdata_old.ini file seems awfully small to contain parsing info.
You must overwrite value of UASparser.ini_url before creating object uasparser = UASparser(cache_dir='./tmp') or just fork this repo, and change this in source.
Any updates?
I'm frequently having issues around failing to download cache data and I'm not really sure what the root cause is. Sometimes it works, sometimes it doesn't. Do you have any leads on what tends to drive this? I was having the error masked by the try, catch clauses surrounding the lines in question and couldn't tell if it was being driven primarily by local permissioning issues or by an inability to get remote data.
Stacktrace follows in case you're curious: