Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406135 - net-print/hplip-3.12.2-r1- sane.py: AttributeError: ScanDevice instance has no attribute 'last_opt'
Summary: net-print/hplip-3.12.2-r1- sane.py: AttributeError: ScanDevice instance has n...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-02-28 11:51 UTC by Martin Mokrejš
Modified: 2012-02-28 17:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sane.py.upstream_bug_927708.patch (sane.py.upstream_bug_927708.patch,615 bytes, patch)
2012-02-28 11:52 UTC, Martin Mokrejš
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2012-02-28 11:51:42 UTC
Hi,
  based on my bugreport there is a fix to hplip done by upstream (see the launchpad bug report URL above). Here are more details. I will attach the patch directly to this bug.

<quote>
This file has the fix for this issue.

In line #275, "return" is added.

Please go to the folder when you run "configure" and "make". Copy this
file sane.py to /scan/ folder.

Run in terminal "make" and "sudo make install".

Hope this would solve your issue.

** Attachment added: "sane.py"
   https://bugs.launchpad.net/hplip/+bug/927708/+attachment/2786833/+files/sane.py

** Changed in: hplip
       Status: In Progress => Fix Committed

You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/927708

Title:
  AttributeError: ScanDevice instance has no attribute 'last_opt'

Status in HP Linux Imaging and Printing:
  Fix Committed

Bug description:
  While trying to get my scanner working I hit this python error:

  $ hp-scan

  HP Linux Imaging and Printing System (ver. 3.11.12)
  Scan Utility ver. 2.2

  Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
  This software comes with ABSOLUTELY NO WARRANTY.
  This is free software, and you are welcome to distribute it
  under certain conditions. See COPYING file for more details.

  Using device: hpaio:/par/OFFICEJET_R45?device=/dev/parport0

  warning: No destinations specified. Adding 'file' destination by default.
  Using device hpaio:/par/OFFICEJET_R45?device=/dev/parport0
  Opening connection to device...
  error: Unable to set option compression to value JPEG
  Traceback (most recent call last):
    File "/usr/bin/hp-scan", line 659, in <module>
      device.setOption('compression', scanner_compression)
    File "/usr/share/hplip/scan/sane.py", line 277, in setOption
      if self.last_opt & scanext.INFO_RELOAD_OPTIONS:
  AttributeError: ScanDevice instance has no attribute 'last_opt'
  $
</quote>
Comment 1 Martin Mokrejš 2012-02-28 11:52:06 UTC
Created attachment 303585 [details, diff]
sane.py.upstream_bug_927708.patch
Comment 2 Daniel Pielmeier gentoo-dev 2012-02-28 17:56:59 UTC
+*hplip-3.12.2-r2 (28 Feb 2012)
+
+  28 Feb 2012; Daniel Pielmeier <billie@gentoo.org> -hplip-3.11.12-r2.ebuild,
+  -hplip-3.12.2.ebuild, +hplip-3.12.2-r2.ebuild,
+  +files/hplip-3.12.2-sane.patch:
+  Revision bump. Fix bug #406135. Thanks to Martin Mokrejš for the report.
+  Remove old.

Thanks for the report.