autojump icon indicating copy to clipboard operation
autojump copied to clipboard

ValueError: could not convert string to float: else

Open Chenlonw opened this issue 6 years ago • 6 comments

Traceback (most recent call last):
  File "/home/chlwang/.autojump/bin/autojump", line 342, in <module>
    sys.exit(main(parse_arguments()))
  File "/home/chlwang/.autojump/bin/autojump", line 281, in main
    save(config, first(add_path(load(config), args.add)))
  File "/home/chlwang/.autojump/bin/autojump_data.py", line 84, in load
    ifilter(correct_length, imap(parse, f)),
  File "/home/chlwang/.autojump/bin/autojump_data.py", line 73, in <lambda>
    tupleize = lambda x: (x[1], float(x[0]))
ValueError: could not convert string to float: else

Chenlonw avatar Apr 04 '19 03:04 Chenlonw

I got a similar exception:

$ j 9d4
Traceback (most recent call last):
  File "/usr/bin/autojump", line 320, in <module>
    sys.exit(main(parse_arguments()))
  File "/usr/bin/autojump", line 292, in main
    entries = entriefy(load(config))
  File "/usr/lib/python3.7/site-packages/autojump_data.py", line 81, in load
    ifilter(correct_length, imap(parse, f))))
  File "/usr/lib/python3.7/site-packages/autojump_data.py", line 71, in <lambda>
    tupleize = lambda x: (x[1], float(x[0]))
ValueError: could not convert string to float: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

...the \x00s continue for a long time, then...

\x00\x00\x00\x00.827625302982206'
autojump: directory '9d4' not found
\n\n
Try `autojump --help` for more information.

My autojump version:

$ autojump --version
autojump v22.5.1

AaronM04 avatar Sep 03 '19 04:09 AaronM04

I got this error, then reinstalled autojump to latest from this repo and now I get:

UnicodeEncodeError: 'decimal' codec can't encode characters in position 0-1: invalid decimal Unicode string

olleharstedt avatar Oct 02 '19 16:10 olleharstedt

My version:

$ autojump --version
autojump v22.5.3

olleharstedt avatar Oct 02 '19 16:10 olleharstedt

I found a workaround to this issue by deleting the autojump database file:

  • ~/.local/share/autojump/autojump.txt on GNU/Linux,
  • ~/Library/autojump/autojump.txt on OSX

jljouannic avatar Nov 20 '19 07:11 jljouannic

@jljouannic Worked for me (Ubuntu 18), thank you!

olleharstedt avatar Nov 20 '19 11:11 olleharstedt

I found a workaround to this issue by deleting the autojump database file:

  • ~/.local/share/autojump/autojump.txt on GNU/Linux,
  • ~/Library/autojump/autojump.txt on OSX

If ~/.local/share/autojump/autojump.txt (Ubantu 18) have autojump.txt and autojump.txt.bak, mv autojump.txt.bak autojump.txt can solve this issue.

AllenHarris avatar Aug 03 '22 11:08 AllenHarris