bharadwaj-raju / TextSuggest

MOVED: https://gitlab.com/bharadwaj-raju/TextSuggest
https://gitlab.com/bharadwaj-raju/TextSuggest
GNU General Public License v3.0
241 stars 20 forks source link

Stopped working...... #20

Closed xircon closed 8 years ago

xircon commented 8 years ago

It is no longer picking up my Custom_Words.txt, it contains:

eml=me!@gmail.com << redacted :)
bbcrl=www.bbc.co.uk/sport/0/rugby-league/
bbcn=www.bbc.co.uk/news/
bsb=#!/bin/sh
tse=medit Custom_Words.txt <<<< yes I know this is wrong :)

Assigned meta-t to textsuggest --noselect and alt-t to textsuggest

The rofi window pops up - shortcuts do not work. I realise it has moved to ~/.config/textsuggest

screenshot_20160630_004348

xircon commented 8 years ago

From a terminal:

textsuggest
Traceback (most recent call last):
  File "/usr/bin/textsuggest", line 196, in get_suggestions
    with open(dict_file) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/textsuggest/dictionaries/English/!.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/textsuggest", line 498, in <module>
    apply_suggestion(display_dialog_list(get_suggestions(current_word)))
  File "/usr/bin/textsuggest", line 218, in get_suggestions
    if word.startswith(alphabet) or word.startswith(alphabet.lower) and string in word:
TypeError: startswith first arg must be str or a tuple of str, not builtin_function_or_method`
bharadwaj-raju commented 8 years ago

The key is this:

No such file or directory: '/usr/share/textsuggest/dictionaries/English/!.txt

This means you

  1. Started TextSuggest without --noselect
  2. Have selected a word beginning with "!"

TextSuggest tries to find a dictionary for the first letter, and of course it doesn't find a "!.txt".

Try with --noselect.

Though this has to be fixed: If no suggestions are found, it should restart in --noselect mode.

bharadwaj-raju commented 8 years ago

Also,

tse=medit Custom_Words.txt <<<< yes I know this is wrong :)

Shouldn't the medit be prefixed with a #?

bharadwaj-raju commented 8 years ago

Are you running absolute Git latest?

Does the program exit after the FileNotFoundError?

xircon commented 8 years ago

Ahh so tse=medit Custom_Words.txt

should be

tse=medit Custom_Words.txt

This works (again) but was working without the '#'

eml=x*****@gmail.com

bbcrl=www.bbc.co.uk/sport/0/rugby-league/

bbcn=www.bbc.co.uk/news/

bsb=#!/bin/sh

tse=medit /home/steve/.config/textsuggest/Custom_Words.txt

I have corrected the path in the medit line. I am running latest aur version.

so.........

tse=medit /home/steve/.config/textsuggest/Custom_Words.txt works

tse=medit /home/steve/.config/textsuggest/Custom_Words.txt doesn't, but used too

tse=#medit /home/steve/.config/textsuggest/Custom_Words.txt doesn't

bharadwaj-raju commented 8 years ago

That's strange.

Only commands need to be prefixed with # and that too like this:

tse=#medit /home/steve/.config/textsuggest/Custom_Words.txt
xircon commented 8 years ago

I will do a screencast. I have downloaded the zip from github and installed using install.sh, will have to do it later as am on my way out.

Steve

xircon commented 8 years ago

Been busy, sorry. What I have done so far: 1>. Wiped every reference of textsuggest off my laptop by uninstalling then manually locating and removing every file or directory with textsuggest in. 2>. Re-installled from the arch user repo. 3>. Created one entry in Custom_Words.txt: eml=xirconuk@gmail.com <<<< Is this correct?

The files I now have with textsuggest are:

/home/steve/.config/textsuggest /home/steve/.config/textsuggest/Custom_Words.txt /home/steve/.config/textsuggest/history.txt /usr/bin/textsuggest /usr/share/textsuggest /usr/share/doc/textsuggest-git /usr/share/doc/textsuggest-git/README /usr/share/licenses/textsuggest-git /usr/share/licenses/textsuggest-git/COPYING /usr/share/man/man1/textsuggest.1.gz /usr/share/textsuggest/Custom_Words.txt /usr/share/textsuggest/Extra_Words.txt /usr/share/textsuggest/dictionaries /usr/share/textsuggest/history.txt /usr/share/textsuggest/dictionaries/Bangla /usr/share/textsuggest/dictionaries/English /usr/share/textsuggest/dictionaries/Bangla/dict.txt /usr/share/textsuggest/dictionaries/English/A.txt /usr/share/textsuggest/dictionaries/English/B.txt /usr/share/textsuggest/dictionaries/English/C.txt /usr/share/textsuggest/dictionaries/English/D.txt /usr/share/textsuggest/dictionaries/English/E.txt /usr/share/textsuggest/dictionaries/English/F.txt /usr/share/textsuggest/dictionaries/English/G.txt /usr/share/textsuggest/dictionaries/English/H.txt /usr/share/textsuggest/dictionaries/English/I.txt /usr/share/textsuggest/dictionaries/English/J.txt /usr/share/textsuggest/dictionaries/English/K.txt /usr/share/textsuggest/dictionaries/English/L.txt /usr/share/textsuggest/dictionaries/English/M.txt /usr/share/textsuggest/dictionaries/English/N.txt /usr/share/textsuggest/dictionaries/English/O.txt /usr/share/textsuggest/dictionaries/English/P.txt /usr/share/textsuggest/dictionaries/English/Q.txt /usr/share/textsuggest/dictionaries/English/R.txt /usr/share/textsuggest/dictionaries/English/S.txt /usr/share/textsuggest/dictionaries/English/T.txt /usr/share/textsuggest/dictionaries/English/U.txt /usr/share/textsuggest/dictionaries/English/V.txt /usr/share/textsuggest/dictionaries/English/W.txt /usr/share/textsuggest/dictionaries/English/X.txt /usr/share/textsuggest/dictionaries/English/Y.txt /usr/share/textsuggest/dictionaries/English/Z.txt

And fonts.py and languages.py are in /usr/lib/python3.5/ But it is just not picking up custom_words.txt. If I press the hotkey for --nosuggest and type eml mjy email address does not appear. I do not know how to proceed

xircon commented 8 years ago

screenshot_20160701_154029

bharadwaj-raju commented 8 years ago

Type eml= and see.

xircon commented 8 years ago

That works.... But in the video/gif you only type eadd not eadd=

Is this because of the history file?

xircon commented 8 years ago

But thanks for all you patience and help :)

bharadwaj-raju commented 8 years ago

@xircon

But in the video/gif you only type eadd not eadd=

Yes, because of the history file, and... I don't think there is such a word that contains eadd in the English language :) The only match it finds is my eadd=

So, should I close this issue? Resolved?

xircon commented 8 years ago

Please close and again thanks!!