Skip to content

Accidentally swapping bytesToLines and linesToBytes produces terrible error message #70

@Julian

Description

@Julian

If you do the above, which I assume everyone will do at one point or another, you get the horrid:

Traceback (most recent call last):
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/julian/Development/pkg/pkg/_cli.py", line 33, in crawl
    react(_crawl, [endpoint])
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/twisted/internet/task.py", line 908, in react
    finished = main(_reactor, *argv)
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/twisted/internet/defer.py", line 1532, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
    result = g.send(result)
  File "/home/julian/Development/pkg/pkg/_cli.py", line 40, in _crawl
    fount.flowTo(Listener(crawlerFlow))
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/protocol.py", line 353, in flowTo
    self._aFlowFunction(f, d)
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/protocol.py", line 411, in aFlowFunction
    listening.impl.drain.receive(Flow(fount, drain))
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/listening.py", line 93, in receive
    item.drain))
  File "/home/julian/Development/pkg/pkg/_cli.py", line 53, in crawlerFlow
    flow.fount.flowTo(crawler).flowTo(flow.drain)
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/_siphon.py", line 215, in flowTo
    result = beginFlowingTo(self, drain)
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/kit.py", line 104, in beginFlowingTo
    return drain.flowingFrom(fount)
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/protocol.py", line 107, in flowingFrom
    beginFlowingFrom(self, fount)
  File "/home/julian/.local/share/virtualenvs/pkg/site-packages/tubes/kit.py", line 128, in beginFlowingFrom
    fount=fount, drain=drain))
exceptions.TypeError: the output of <Fount for <tubes.framing._CarriageReturnRemover object at 0x0000000001a24e90>>, <InterfaceClass tubes.itube.IFrame>, is not compatible with the required input type of <tubes.protocol._TransportDrain object at 0x0000000001a24ec8>, <InterfaceClass tubes.itube.ISegment>

which is pretty hard to decypher.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions