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

parse error: Invalid numeric literal at line 1, column 17 #10

Closed
evb-gh opened this issue Feb 21, 2021 · 11 comments
Closed

parse error: Invalid numeric literal at line 1, column 17 #10

evb-gh opened this issue Feb 21, 2021 · 11 comments

Comments

@evb-gh
Copy link

evb-gh commented Feb 21, 2021

Getting the following error on macOS 10.14.6

$> ytfzf test string
parse error: Invalid numeric literal at line 1, column 17
No results found. Try different keywords.
Check for new versions and report at: https://github.com/pystardust/ytfzf

Don't have enough experience to debug further. Would appreciate some help.

@pystardust
Copy link
Owner

is this the latest version? I had fixed this yesterday.

@pystardust
Copy link
Owner

@evb-gh please update and let me know if the error persists.
This was happening if the search results contained non english char/symbols.

@evb-gh
Copy link
Author

evb-gh commented Feb 21, 2021

Deleted and then recloned the repo. Got the same error. All dependencies are up to date.

@pystardust
Copy link
Owner

I would need to look into the data you are curling. Could you reproduce the error using some search query which you are comfortable to share here. A search term that produces the error is enough form me to work with.

@evb-gh
Copy link
Author

evb-gh commented Feb 21, 2021

I am literally using test string as a search term and I get the same error using any other term.

@evb-gh
Copy link
Author

evb-gh commented Feb 21, 2021

My guess is that it has to do with the difference between gnu and macOS commands.

@pystardust
Copy link
Owner

pystardust commented Feb 21, 2021

This search term is wroking for me.
The command you could be stubling on are

  • printf
  • sed

As these are the commands that appear before parsing into jq, which is causing this error.
Try changin up version of these if you can. I don't know much about the differences so I won't be able to comment.
OS: Linux 5.10.16-artix1-1

@evb-gh
Copy link
Author

evb-gh commented Feb 21, 2021

I went and installed gnu-sed then I replaced sed with gsed in your code and now everything works.
How would I preserve these changes on future repo update?

@pystardust
Copy link
Owner

You may need to interfere with the code. (every update).
But dont worry its just one line.

alias sed='gsed'

Add this line in the start of the code near defaults. (below #!bin/sh)

@pystardust
Copy link
Owner

pystardust commented Feb 22, 2021

I am closing this issue, do let me know if you have any more queries

@evb-gh
Copy link
Author

evb-gh commented Feb 24, 2021

Thats a much more interesting and simple solution than what I had in mind. Thanks!

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