Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPrinters(); TypeError: wrong job status #41

Closed
thejae opened this issue Feb 7, 2015 · 2 comments
Closed

getPrinters(); TypeError: wrong job status #41

thejae opened this issue Feb 7, 2015 · 2 comments
Labels
Milestone

Comments

@thejae
Copy link

thejae commented Feb 7, 2015

Thanks for this package, am running into some trouble getting the list of printers.

Here is my code

var printer = require("./node_modules/printer/lib"),
    util = require('util');
console.log("installed printers:\n"+util.inspect(printer.getPrinters(), {colors:true, depth:10}));

The error message

pi@pi-rasp /var/www/nodejs $ node printc

/var/www/nodejs/node_modules/printer/lib/printer.js:57
    var printers = printer_helper.getPrinters();
                                  ^
TypeError: wrong job status:
    at Object.getPrinters (/var/www/nodejs/node_modules/printer/lib/printer.js:57:35)
    at Object.<anonymous> (/var/www/nodejs/printc.js:3:58)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

Package version: 0.0.5
NodeJS: v0.10.35
CUPS version: 1.5.3
System: Linux pi-rasp 3.18.5+ #748 PREEMPT Wed Feb 4 21:24:41 GMT 2015 armv6l GNU/Linux

@thejae thejae changed the title TypeError: wrong job status getPrinters(); TypeError: wrong job status Feb 7, 2015
@tojocky tojocky added the bug label Feb 8, 2015
tojocky added a commit that referenced this issue Feb 9, 2015
Add job status code in error message, if not defined.  #41
@tojocky
Copy link
Owner

tojocky commented Feb 9, 2015

Could you please retest with the latest changes (re-install from GIT npm install git+https://github.com/tojocky/node-printer.git) and let me know what is the error now. I need to catch the new job status, unsupported by printer module.

Thank you in advance.

@tojocky tojocky added this to the 0.0.5 milestone Feb 9, 2015
tojocky added a commit that referenced this issue Feb 12, 2015
posix: do not throw error of unsupported job status #41
@tojocky
Copy link
Owner

tojocky commented Feb 12, 2015

I'm closing this issue. Would be nice to have this tested to know what job status is not supported.

@tojocky tojocky closed this as completed Feb 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants