This is to become an open source clone of papercut style print management systems.
the-maldridge / paperairplane Goto Github PK
View Code? Open in Web Editor NEWOpen Source print management software
License: MIT License
Open Source print management software
License: MIT License
This library has been made available under a compatible license: https://gist.github.com/mkropat/7559409
I keep getting an error in mcrspl.py when a print job is sent to the test printer:
DEBUG:root:Determining user for address 127.0.0.1
DEBUG:root:User determined to be tim
DEBUG:root:New job from user tim on test
INFO:root:Spooling Job 226b754206 for tim on test
DEBUG:root:Alerting the central controller
DEBUG:root:Attempting to send job to central
ERROR:root:An error was encountered while attempting to alert the central spooler: 'utf8' codec can't decode byte 0xf6 in position 155: invalid start byte
Traceback (most recent call last):
File "mcrspl.py", line 41, in alertSpooler
sock.sendall(base64.b64encode(json.dumps(job)))
File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 155: invalid start byte
DEBUG:root:Successfully spooled 226b754206
Here's one of the smaller job objects that has caused this issue. Notice the \xf6 near the start of the '\x's that is triggering the json parsing error.
{'postscript': '\x1b%-12345X@PJL SET EDGEENHANCE=NORMAL\r\n@PJL SET XIGNOREFF=OFF\r\n@PJL SET PAPERTYPE = OFF\n@PJL DEFAULT SERVICEDATE=20140920\n@PJL ENTER LANGUAGE = QPDL\r\n\x00\x06\x00\x01\x00\t\xf6\x0c\xe4\x01\x00\x01\x00\x00\x03\x01\x06\x01\x00\x01\t\x1b%-12345X', 'destPrinter': 'test1', 'originUser': 'tim', 'name': '226b754206', 'originPrinter': 'test'}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.