Giter Club home page Giter Club logo

paperairplane's Introduction

WIP

This is to become an open source clone of papercut style print management systems.

paperairplane's People

Contributors

the-maldridge avatar

Stargazers

 avatar  avatar Priya Dhoundiyal avatar Dan Elkins avatar GAURAV avatar Eric Dilmore avatar

Watchers

James Cloos avatar  avatar Eric Dilmore avatar Seri avatar Toyam Cox avatar

paperairplane's Issues

json.dumps crashing in mcrspl.py

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'}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.