On Mittwoch, 30. Mai 2018 16:44:42 CEST Brian Potkin wrote: > On Wed 30 May 2018 at 12:40:35 +0200, Rainer Dorsch wrote: > > 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): > I suppose this should work ok if done when cupsd is not running. I'd be > inclined to modify the existing queue or set up a new one. A virtual > queue would allow testing Tea4CUPS without wrapping the backend.
I do the modification after a systemd stop cups.service > The printer is being powered on by some type of electronic switch? Yes, this one: http://energenie.com/item.aspx?id=7415&lang=en Works well with the sispmctl package. > > /etc/cups/printers.conf: > > DeviceURI tea4cups:/http://hpljwlan:631/ipp/ > > http:// is a symlink the ipp backend. It's always useful to know what > model of printer is being used. I was not aware of that, I need to dig into more detail here in the next days. The printer is a HP CP1525NW. > > I configured the printer power on script: > > > > /etc/cups/tea4cups.conf: > > > > > > but I get unfortunately an error in /var/log/cups/error_log > > > > > > E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback > > (most recent call last): > > > > Is seems something goes wrong while setting the TEABILLING environement > > variable. > > > > Has anybody an idea why that could be? > > tea4cups.conf is the configuration file for Tea4CUPS. I guess you are > using a prehook or posthook to activate the printer; we really need to > know what you have for it (including any associated script). What part > does TEABILLING play in the process? Yes, a prehook and the TEABILLING shows in the stack trace, I am not using it intentionally at all... Aaah...now I see what went wrong: My orignal post contained the information, but it seems only in the HTML view, not sure why kmail decided to leave out this information in the text representation :-/ Avoided HTML view now in this mail, sorry for that. For easier reference I append the previous post: 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 environment variable. Many thank Rainer -- Rainer Dorsch http://bokomoko.de/