Re: Tea4CUPS: TEABILLING reports error
Hi Daniel, no unfortunately I have not yet resolved the problem. I still issue the prehook manually. But I did not yet dig too deep into this issue... If you find the root cause, please let me knowand good to know that this is a cross distri issue, even Arch is affected. Rainer On Samstag, 11. August 2018 17:29:35 CEST daniel-mailingli...@dadosch.de wrote: > Hey there, > I'm having this error too, on my KDE Neon System as well as on my (now) > Arch System. It works most of the times, but not all. > > Did you finally manage to find a solution, Rainer? > > > -- > Daniel -- Rainer Dorsch http://bokomoko.de/
Re: Tea4CUPS: TEABILLING reports error
https://www.mycause.com.au/page/183259/a-smile-will-change-a-day-love-that-changed-my-world From: Rainer Dorsch Sent: Wednesday, 30 May 2018 8:40 PM To: debian-user@lists.debian.org Cc: debian-print...@lists.debian.org Subject: Tea4CUPS: TEABILLING reports error Hi, 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 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. Has anybody an idea why that could be? Many thanks Rainer -- Rainer Dorsch http://bokomoko.de/
Re: Tea4CUPS: TEABILLING reports error
Hey there, I'm having this error too, on my KDE Neon System as well as on my (now) Arch System. It works most of the times, but not all. Did you finally manage to find a solution, Rainer? -- Daniel
Re: Tea4CUPS: TEABILLING reports error
On Mon 18 Jun 2018 at 22:04:50 +0200, Rainer Dorsch wrote: > Hi Brian, > > thank you for your response and please apologize for my slow response. No problem. > On Donnerstag, 31. Mai 2018 20:04:22 CEST Brian wrote: > > Your tea4cups.conf is poorly. Here is a minimal one which works for me: > > [Global] > > debug : yes > > directory : /var/spool/cups/ > > prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL > > Hmmmine does not look so much different, I edited them template shipped > by > Debian: > > rd@b370:/var/log/cups$ grep -v '^#' /etc/cups/tea4cups.conf |grep -v '^$' > [global] > directory : /var/spool/cups/ > prehook_sispmctl : /usr/local/bin/printeron > rd@b370:/var/log/cups$ > > ... > > I had to change [Global]-> [global] in your config (?) A typo. Sorry. [Snip] > root@b370:/etc/cups# lpadmin -p virtq -v tea4cups:// -E -m raw > lpadmin: Raw queues are deprecated and will stop working in a future version > of CUPS. > root@b370:/etc/cups# Nothing to worry about (yet). > > 3. Print to virtq: > > > > lp -d virtq /etc/services > > root@b370:/etc/cups# lp -d virtq /etc/services > Anfrage-ID ist virtq-40 (1 Datei(en)) > root@b370:/etc/cups# > > > > 4. cat /tmp/SISPMCTL and look at the error_log. > > rd@b370:~$ cat /tmp/SISPMCTL > rd@b370:~$ > > not sure why this is empty... (?) The hook completes without a warning. I get told that no GEMBIRD SIS-PM is found. > but no entry in the error_log So, the hook works. > > 5. Test with your original queue and my tea4cups.conf. > > same behavior as above, printeron is executed when issuing > > lp -d virtq /etc/services > > But when printing on my queue [Snip] > I get the same error_log again: [Snip] > Is my DeviceURI wrong? You mean "tea4cups:/http://hpljwlan:631/ipp/;? Advice on an IPP URI is at https://wiki.debian.org/PrintQueuesCUPS Or use tea4cups:/socket://... instead. [Snip] -- Brian.
Re: Tea4CUPS: TEABILLING reports error
Hi Brian, thank you for your response and please apologize for my slow response. On Donnerstag, 31. Mai 2018 20:04:22 CEST Brian wrote: > Your tea4cups.conf is poorly. Here is a minimal one which works for me: > [Global] > debug : yes > directory : /var/spool/cups/ > prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL Hmmmine does not look so much different, I edited them template shipped by Debian: rd@b370:/var/log/cups$ grep -v '^#' /etc/cups/tea4cups.conf |grep -v '^$' [global] directory : /var/spool/cups/ prehook_sispmctl : /usr/local/bin/printeron rd@b370:/var/log/cups$ ... I had to change [Global]-> [global] in your config (?) E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : Traceback (most recent call last): E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : File \"/usr/ lib/cups/backend/tea4cups\", line 1503, in E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : returncode = wrapper.runBranches() E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : File \"/usr/ lib/cups/backend/tea4cups\", line 1302, in runBranches E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : branches = self.enumBranches(self.PrinterName, \"prehook\") E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : File \"/usr/ lib/cups/backend/tea4cups\", line 1010, in enumBranches E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : raise ConfigError, \"Invalid configuration file : %s\" % msg E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : ConfigError: Invalid configuration file : No section: \'global\' rd@b370:~$ cat /etc/cups/tea4cups.conf [global] debug : yes directory : /var/spool/cups/ prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL rd@b370:~$ > 1. touch /tmp/SISPMCTL rd@b370:~$ ls -l /tmp/SISPMCTL -rw-rw-rw- 1 root root 0 Jun 18 21:29 /tmp/SISPMCTL rd@b370:~$ > 2. Set up a raw queue: > > lpadmin -p virtq -v tea4cups:// -E -m raw root@b370:/etc/cups# lpadmin -p virtq -v tea4cups:// -E -m raw lpadmin: Raw queues are deprecated and will stop working in a future version of CUPS. root@b370:/etc/cups# > 3. Print to virtq: > > lp -d virtq /etc/services root@b370:/etc/cups# lp -d virtq /etc/services Anfrage-ID ist virtq-40 (1 Datei(en)) root@b370:/etc/cups# > 4. cat /tmp/SISPMCTL and look at the error_log. rd@b370:~$ cat /tmp/SISPMCTL rd@b370:~$ not sure why this is empty... (?) but no entry in the error_log > 5. Test with your original queue and my tea4cups.conf. same behavior as above, printeron is executed when issuing lp -d virtq /etc/services But when printing on my queue UUID urn:uuid:2b1f194f-d781-33a6-7340-1b2f4d154ce4 AuthInfoRequired none Info CP1525NW MakeModel HP Color LaserJet cp1518ni pcl3, hpcups 3.17.10 DeviceURI tea4cups:/http://hpljwlan:631/ipp/ State Idle StateTime 1529351306 ConfigTime 1526331301 Reason cups-ipp-conformance-failure-report Reason cups-ipp-missing-send-document Type 36892 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job Attribute marker-colors \#00,#FF00FF,#00,#00 Attribute marker-levels 44,46,46,48 Attribute marker-low-levels 6,6,6,7 Attribute marker-high-levels 100,100,100,100 Attribute marker-names Cyan Cartridge HP CE321A,Magenta Cartridge HP CE323A,Yellow Cartridge HP CE322A,Black Cartridge HP CE320A Attribute marker-types toner,toner,toner,toner Attribute marker-change-time 1527675649 I get the same error_log again: [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : Traceback (most recent call last): E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : File \"/usr/ lib/cups/backend/tea4cups\", line 1502, in E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : wrapper.exportAttributes() E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : File \"/usr/ lib/cups/backend/tea4cups\", line 1214, in exportAttributes E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : os.environ[\"TEABILLING\"] = self.JobBilling or \"\" E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : File \"/usr/ lib/python2.7/os.py\", line 473, in __setitem__ E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : putenv(key, item) E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : TypeError: putenv() argument 2 must be string, not int Is my DeviceURI wrong? For reference, my printeron: rd@b370:~$ cat /usr/local/bin/printeron #!/bin/sh sispmctl -o 3 date > /tmp/printeron # Wait until printer is active while ! nc -vzw 1 hpljwlan 80 2> /dev/null; do sleep 5 done date >> /tmp/printeron rd@b370:~$ Thanks Rainer -- Rainer Dorsch http://bokomoko.de/
Re: Tea4CUPS: TEABILLING reports error
On Wed 30 May 2018 at 23:18:27 +0200, Rainer Dorsch wrote: > 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 It is intended that printers.conf is managed by cupsd and not by user editing. Into the bargain, future CUPS is planned to rename and relocate the file. (But this is not the cuase of your problem). > > The printer is being powered on by some type of electronic switch? > > Yes, this one: http://energenie.com/item.aspx?id=7415=en > > Works well with the sispmctl package. I don't have one of these. But it is easy to pretend I do. (See below). > > > /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. Not the cause of your problem and not really an issue. I was just a bit surprised to see http:// used instead of ipp://. > The printer is a HP CP1525NW. An oldish printer. I wonder how well the ipp protocol is implemented on it? socket:// might be better. [...] > > 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 What are the script contents? > 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 > 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. Your tea4cups.conf is poorly. Here is a minimal one which works for me: [Global] debug : yes directory : /var/spool/cups/ prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL 1. touch /tmp/SISPMCTL 2. Set up a raw queue: lpadmin -p virtq -v tea4cups:// -E -m raw 3. Print to virtq: lp -d virtq /etc/services 4. cat /tmp/SISPMCTL and look at the error_log. 5. Test with your original queue and my tea4cups.conf. -- Brian.
Re: Tea4CUPS: TEABILLING reports error
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=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 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/
Re: Tea4CUPS: TEABILLING reports error
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. The printer is being powered on by some type of electronic switch? > /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 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? -- Brian.
Tea4CUPS: TEABILLING reports error
Hi, 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: 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? Many thanks Rainer -- Rainer Dorsch http://bokomoko.de/