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

Accidentally swapping bytesToLines and linesToBytes produces terrible error message #70

Open
Julian opened this issue Jul 22, 2017 · 1 comment

Comments

@Julian
Copy link
Member

Julian commented Jul 22, 2017

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.

@glyph
Copy link
Member

glyph commented Jul 23, 2017

Improved debuggability is great! How would you suggest this output look better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants