python-scan-eSCL icon indicating copy to clipboard operation
python-scan-eSCL copied to clipboard

Same printer fails on Debian but works on Arch Linux

Open makew0rld opened this issue 5 years ago • 1 comments

Here is the error output on Debian:

Found scanner 'HP ENVY 4520 series [36FD26]._uscan._tcp.local.' at 'HP18602436FD26.local.'
Traceback (most recent call last):
  File "scan.py", line 49, in <module>
    tree = etree.parse(urllib2.urlopen(req))
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

Both zeroconf and lxml are installed. The same command works completely fine on an Arch Linux machine.

The solution was to install avahi-daemon on the Debian machine, which will scan, find, and resolve those .local hostnames. Maybe you can add this as a dependency to the README?

I believe this fixes #1, @chriscamacho 's issue.

makew0rld avatar Mar 26 '20 18:03 makew0rld

Yes, you do need a complete zeroconf setup; missing the resolver breaks the hostnames.

This project will be archived, because escl support has now been added to SANE Backends 1.0.29 released last month.

kno10 avatar Mar 26 '20 20:03 kno10