Package: cups-tea4cups
Version: 3.13~alpha0+svn3565-4
Severity: important
Tags: patch

Dear Maintainer,

[this bug report corresponds to this discussion thread on debian-user

https://lists.debian.org/debian-user/2018/05/msg01024.html

(cont'd at next month)
https://lists.debian.org/debian-user/2018/06/msg00453.html ]


I have tea4cups configured to power on my printer before printing. In order to 
do this, I prepended tea4cups:/ to the DeviceURI in printers.conf (if I remove 
this and power on the printer manually before printing, everything works as 
expected):
 
/etc/cups/printers.conf:
DeviceURI tea4cups:/http://hpljwlan:631/ipp/
I configured the printer power on script:
 
/etc/cups/tea4cups.conf:
prehook_sispmctl : /usr/local/bin/printeron
 
but I get unfortunately an error in /var/log/cups/error_log
with every print job and the job is stopped.
 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback (most 
recent call last): 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :   File 
\"/usr/lib/cups/backend/tea4cups\", line 1502, in <module> 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :     
wrapper.exportAttributes() 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :   File 
\"/usr/lib/cups/backend/tea4cups\", line 1214, in exportAttributes 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :     
os.environ[\"TEABILLING\"] = self.JobBilling or \"\" 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :   File 
\"/usr/lib/python2.7/os.py\", line 473, in __setitem__ 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :     putenv(key, 
item) 
E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : TypeError: 
putenv() argument 2 must be string, not int

Is seems something goes wrong while setting the TEABILLING environement 
variable.

There are more details listed in the mailing list thread linked above, but I 
think there are not very relevant.


In the meantime Daniel reported that he sees the same problem also in Arch and 
KDE Neon:

https://lists.debian.org/debian-user/2018/08/msg00505.html

Via private mail he pointed out that this patch fixes the problem for him in 
Arch linux:

https://gitlab.com/dadosch/tea4cups/commit/1aac1f51ed35300891b3f0f01b34b37b523f1736

I applied it on my Debian buster system and it fixes my issue as well.

All credits for the fix go to Daniel.

Thanks
Rainer


-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (110, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de:en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cups-tea4cups depends on:
ii  cups    2.2.8-5
ii  python  2.7.15-3

cups-tea4cups recommends no packages.

cups-tea4cups suggests no packages.

-- Configuration Files:
/etc/cups/tea4cups.conf changed:
[global]
directory : /var/spool/cups/
prehook_sispmctl : /usr/local/bin/printeron


-- no debconf information

Reply via email to