• Members 2 posts
    May 27, 2024, 5:16 a.m.

    Hi All-
    I have installed inkcut successfully on my raspberry pi 5, and I was intending to use it to control a graphtec fc8000. It runs without issue and I was able to detect my printer (though I dont have a proper linux driver for it..) and when I attempt to send a job I get a message that is as follows


    traceback (most recent call last):
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 2260, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 2172, in _cancellableInlineCallbacks
    _inlineCallbacks(None, gen, status, _copy_context())
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 2003, in _inlineCallbacks
    result = context.run(gen.send, result)
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 631, in disconnect
    yield defer.maybeDeferred(self.connection.disconnect)
    --- <exception caught here> ---
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 839, in submit
    yield defer.maybeDeferred(self.disconnect)
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 631, in disconnect
    yield defer.maybeDeferred(self.connection.disconnect)
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 212, in maybeDeferred
    result = f(args, *kwargs)
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py", line 239, in disconnect
    self.connection.close()
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py", line 185, in close
    self._protocol.transport.closeStdin()
    builtins.AttributeError: 'NoneType' object has no attribute 'closeStdin'

    I cant make heads nor tails of this, so any thoughts are appreciated.

  • June 11, 2024, 9:53 a.m.

    Can you attach the log? It looks like there is an error causing it to never make the connection or something.

  • Members 2 posts
    July 1, 2024, 2:42 a.m.

    Below is the log when I go to print, it is setup in CUPS as a USB printer, using the RAW driver as I have seen other suggest. I also noticed that the pre-print dialog that might show print time shows a "zero" for time, as though there is no data being generated for the job to be sent. Not sure if this means anything but I thought Id add it.

    2024-06-30 21:38:52,313 | DEBUG | inkcut | clipboard | []
    2024-06-30 21:39:12,349 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:39:13,621 | DEBUG | inkcut | clipboard | []
    2024-06-30 21:40:20,984 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:24,606 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:38,458 | INFO | inkcut | Saving state due to change: {'type': 'request'}
    2024-06-30 21:40:38,469 | INFO | inkcut | {}
    2024-06-30 21:40:38,473 | INFO | inkcut | Saving state due to change: {'type': 'request'}
    2024-06-30 21:40:38,515 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:40,594 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:41,587 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:43,241 | DEBUG | inkcut | device | submit -
    2024-06-30 21:40:43,242 | INFO | inkcut | device | Initializing job
    2024-06-30 21:40:43,242 | DEBUG | inkcut | device | init -
    2024-06-30 21:40:43,243 | DEBUG | inkcut | device | Path length: 8900.214285736705
    2024-06-30 21:40:43,285 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:44,504 | INFO | inkcut | device | Connecting to device
    2024-06-30 21:40:44,505 | INFO | inkcut | device | Processing job
    2024-06-30 21:40:44,505 | DEBUG | inkcut | device | connect
    2024-06-30 21:40:44,509 | ERROR | inkcut | Graphtec_FC8000 | Traceback (most recent call last):
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py", line 222, in connect
    self.connection.open()
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py", line 173, in open
    self.printer = reactor.spawnProcess(
    ^^^^^^^^^^^^^^^^^^^^^
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/posixbase.py", line 192, in spawnProcess
    return process.Process(
    ^^^^^^^^^^^^^^^^
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/process.py", line 820, in init
    self._fork(path, uid, gid, executable, args, environment, fdmap=fdmap)
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/process.py", line 401, in _fork
    if self._trySpawnInsteadOfFork(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/process.py", line 890, in _trySpawnInsteadOfFork
    self.pid = os.posix_spawnp(
    ^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: 'lpr'

    2024-06-30 21:40:44,510 | ERROR | inkcut | Traceback (most recent call last):
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 749, in submit
    yield defer.maybeDeferred(self.connect)
    FileNotFoundError: [Errno 2] No such file or directory: 'lpr'

    2024-06-30 21:40:44,510 | DEBUG | inkcut | device | disconnect
    2024-06-30 21:40:44,516 | ERROR | inkcut | device | Execution error Traceback (most recent call last):
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 749, in submit
    yield defer.maybeDeferred(self.connect)
    FileNotFoundError: [Errno 2] No such file or directory: 'lpr'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 839, in submit
    yield defer.maybeDeferred(self.disconnect)
    AttributeError: 'NoneType' object has no attribute 'closeStdin'

    2024-06-30 21:40:44,516 | ERROR | inkcut | [Failure instance: Traceback: <class 'AttributeError'>: 'NoneType' object has no attribute 'closeStdin'
    /home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py:2260:unwindGenerator
    /home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py:2172:_cancellableInlineCallbacks
    /home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py:2003:_inlineCallbacks
    /home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py:631:disconnect
    --- <exception caught here> ---
    /home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py:839:submit
    /home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py:631:disconnect
    /home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py:212:maybeDeferred
    /home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py:239:disconnect
    /home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py:185:close
    ]
    2024-06-30 21:40:44,517 | CRITICAL | inkcut | Traceback (most recent call last):
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 2260, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 2172, in _cancellableInlineCallbacks
    _inlineCallbacks(None, gen, status, _copy_context())
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 2003, in _inlineCallbacks
    result = context.run(gen.send, result)
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 631, in disconnect
    yield defer.maybeDeferred(self.connection.disconnect)
    --- <exception caught here> ---
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 839, in submit
    yield defer.maybeDeferred(self.disconnect)
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/plugin.py", line 631, in disconnect
    yield defer.maybeDeferred(self.connection.disconnect)
    File "/home/michael/.local/lib/python3.11/site-packages/twisted/internet/defer.py", line 212, in maybeDeferred
    result = f(args, *kwargs)
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py", line 239, in disconnect
    self.connection.close()
    File "/home/michael/.local/lib/python3.11/site-packages/inkcut/device/transports/printer/plugin.py", line 185, in close
    self._protocol.transport.closeStdin()
    builtins.AttributeError: 'NoneType' object has no attribute 'closeStdin'

    2024-06-30 21:40:44,551 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:44,638 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:46,047 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:48,535 | DEBUG | inkcut | clipboard | []
    2024-06-30 21:40:50,807 | DEBUG | inkcut | clipboard | ['text/plain;charset=utf-8', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'text/plain', 'STRING', 'SAVE_TARGETS']
    2024-06-30 21:40:52,392 | DEBUG | inkcut | clipboard | []