danslimmon/oscar

Digit-Eyes account account requires funding, bypass

Marco-online opened this issue · 3 comments

is there a way to remove Digit-Eyes lookup from scan.py?
so only Trello is used?

i don't want to lookup in Digit-Eyes because i manualy add my products.

Traceback (most recent call last):
  File "/var/oscar/scan.py", line 203, in <module>
    desc = u.get_description(barcode)
  File "/var/oscar/scan.py", line 59, in get_description
    json_blob = urllib2.urlopen(url).read()
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 407, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 445, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 402: Account requires funding.

Not at the moment. Perhaps you might want to put in a configuration option as the start of #25; that lets you choose which 'engine' for barcode lookup is used - and in your case, you simply choose a fake that never returns matches.

I added OpenFoodFacts as a driver, which requires no payment and has a pretty well structured API in #53 ; you might be interested in that.

Fixed by #48