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

Launching and piping command to the app's prompt crashes it #90

Open
eyedol opened this issue Mar 2, 2017 · 1 comment
Open

Launching and piping command to the app's prompt crashes it #90

eyedol opened this issue Mar 2, 2017 · 1 comment
Labels

Comments

@eyedol
Copy link

eyedol commented Mar 2, 2017

When I launch haxor-news like so haxor-news | hn top. App crashes with the stack trace below

Traceback (most recent call last):
  File "/usr/local/bin/haxor-news", line 11, in <module>
    load_entry_point('haxor-news==0.4.1', 'console_scripts', 'haxor-news')()
  File "/usr/local/lib/python2.7/site-packages/haxor_news/main.py", line 26, in cli
    haxor.run_cli()
  File "/usr/local/lib/python2.7/site-packages/haxor_news/haxor.py", line 215, in run_cli
    document = self.cli.run()
  File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 329, in run
    self.renderer.reset()
  File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/renderer.py", line 273, in reset
    self.output.flush()
  File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 229, in flush
    out.write(data.encode(self.stdout.encoding, 'replace'))
TypeError: encode() argument 1 must be string, not None
  1.   Lyft Is Said to Seek New Funding as Its Rival Uber Stumbles (nytimes.com)
         173 points by uladzislau 4 hours ago | 185 comments
  2.   Operation Rosehubpatching thousands of open-source projects (opensource.googleblog.com)
         464 points by fhoffa 8 hours ago | 66 comments
  3.   The myth of using Scala as a better Java (appliedscala.com)
         118 points by bontoJR Yesterday | 72 comments
  4.   V8: A Tale of TurboFan (benediktmeurer.de)
         60 points by JoshTriplett 21 hours ago | 2 comments
  5.   Dilution (blog.ycombinator.com)
         391 points by firloop 11 hours ago | 112 comments
  6.   What fossil fuels are doing to our oceans (newhumanist.org.uk)
         122 points by kawera 19 hours ago | 61 comments
  7.   AWS LambdaBest practices (cloudncode.blog)
         41 points by maingi4 4 hours ago | 7 comments
  8.   Leaked Snapchat emails: Anti-gun group told to pay or NRA ads may appear (mic.com)
         324 points by davidbarker 13 hours ago | 197 comments
  9.   The Clojure Error Message Catalog: common error messages and their meanings (github.com)
         61 points by kimi Yesterday | 1 comments
  10.  Facebook brings suicide prevention tools to Live and Messenger (techcrunch.com)
         16 points by tooba 19 hours ago | 3 comments
  Tip: View the page or comments for 1 through 10 with the following command:
    hn view [#] optional: [-c] [-cr] [-cu] [-cq "regex"] [-ch] [-b] [--help]
@donnemartin
Copy link
Owner

Hi @eyedol, I can reproduce this issue, thanks for the report!

@donnemartin donnemartin added the bug label Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants