GithubHelp home page GithubHelp logo

jmespath.terminal's People

Contributors

brandond avatar jamesls avatar kit494way avatar richardbronosky avatar springcomp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kit494way

jmespath.terminal's Issues

Error when piping JSON to jpterm

Thanks @springcomp for forking and updating this project ๐Ÿ™‚.

I have found that piping into jpterm generates an error:

cat defaults/main.yml | yq -o=json | jpterm 
Traceback (most recent call last):
  File "/home/chris/.local/bin/jpterm", line 6, in <module>
    jpterm.main()
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/jpterm.py", line 231, in main
    display.main(screen=screen)
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/jpterm.py", line 148, in main
    self.loop.run()
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 287, in run
    self._run()
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 385, in _run
    self.event_loop.run()
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 790, in run
    self._loop()
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 827, in _loop
    self._watch_files[fd]()
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 417, in <lambda>
    event_loop, callback, self.get_available_raw_input())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 449, in get_available_raw_input
    codes = self._get_gpm_codes() + self._get_keyboard_codes()
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 523, in _get_keyboard_codes
    code = self._getch_nodelay()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 661, in _getch_nodelay
    return self._getch(0)
           ^^^^^^^^^^^^^^
  File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 571, in _getch
    return ord(os.read(fd, 1))
           ^^^^^^^^^^^^^^^^^^^
TypeError: ord() expected a character, but string of length 0 found

But writing a file and opening it work fine:

cat defaults/main.yml | yq -o=json > ~/tmp/ansible_defaults.json
jpterm ~/tmp/ansible_defaults.json

This isn't a big or urgent problem!

This is on Debian Bookworm with a pipx installed version:

which jpterm
/home/chris/.local/bin/jpterm
/home/chris/.local/bin/jpterm --version
jmespath-term 1.1.1
/usr/bin/python3 --version
Python 3.11.2

Update classifier in setup.py

The dependent package jmespath-community supports Python 3.7 or higher.
Because Python 3.7 will be EOL at 2023-06-27, it may be better to specify 3.8 and above.
At least 2.6, 2.7 and 3.3 can be dropped.

classifiers=(
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',

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.