kno10 / python-scan-eSCL

Scan using a network scanner with eSCL protocol (e.g. Canon PIXMA)
GNU Affero General Public License v3.0
16 stars 4 forks source link

Same printer fails on Debian but works on Arch Linux #9

Open makew0rld opened 4 years ago

makew0rld commented 4 years ago

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.

kno10 commented 4 years ago

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.