foss-np / anubad

gloss browser for https://github.com/foss-np/np-l10n-glossary
Other
9 stars 5 forks source link

Broken buttons, does not work when clicked throws errors #6

Closed samundra closed 8 years ago

samundra commented 8 years ago

This is how the UI looks, some of the icons are broken as expected :)

I already have the "foss" created from latest glossary repo.

Broken UI

When Load New Glossary button is clicked, it displays the following error in console:

Traceback (most recent call last):
  File "main.py", line 167, in <lambda>
    bar.b_Open.connect("clicked", lambda w: self._open_dir())
  File "main.py", line 112, in wrapper
    return func(self, *args, **kwargs)
  File "main.py", line 485, in _open_dir
    print("pid:", Popen(["nemo", path]).pid, file=fp5)
  File "/usr/lib/python3.4/subprocess.py", line 848, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1446, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'nemo'

Trying to run app from master branch gives following output.

samundra@samshrestha:~/Projects/anubad/src$ python3 app.py 
error: invalid glossary path 
glossary: foss/en2np/ 0
error: invalid glossary path 
glossary: foss/np2en/ 0

(app.py:25343): IBUS-WARNING **: The owner of /home/samundra/.config/ibus/bus is not samundra!
plugin: espeak.py

(google-chrome-stable:25451): IBUS-WARNING **: The owner of /home/samundra/.config/ibus/bus is not samundra!
[25451:25451:0216/010716:ERROR:logging.h(808)] Failed to call method: org.freedesktop.DBus.ObjectManager.GetManagedObjects: object_path= /: org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects" with signature "" on interface "org.freedesktop.DBus.ObjectManager" doesn't exist

[25451:25451:0216/010716:ERROR:logging.h(808)] Failed to call method: org.freedesktop.DBus.ObjectManager.GetManagedObjects: object_path= /: org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects" with signature "" on interface "org.freedesktop.DBus.ObjectManager" doesn't exist

espeak: 
Traceback (most recent call last):
  File "/home/samundra/Projects/anubad/src/../plug_ins/espeak.py", line 17, in <lambda>
    bar.b_espeak.connect("clicked", lambda w: espeak(root.copy_BUFFER))
  File "/home/samundra/Projects/anubad/src/../plug_ins/espeak.py", line 9, in espeak
    Popen(["espeak", "-v", tone, word])
  File "/usr/lib/python3.4/subprocess.py", line 848, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1446, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'espeak'

Switched to dev branch and then ran python3 app.py gave following errors:

samundra@samshrestha:~/Projects/sam_anubad/src$ python3 app.py 
error: invalid glossary path 
glossary: foss/en2np/ 0
error: invalid glossary path 
glossary: foss/np2en/ 0
Traceback (most recent call last):
  File "app.py", line 110, in <module>
    root = main()
  File "/home/samundra/Projects/sam_anubad/src/main.py", line 593, in main
    root = GUI()
  File "/home/samundra/Projects/sam_anubad/src/main.py", line 98, in __init__
    self.makeWidgets()
  File "/home/samundra/Projects/sam_anubad/src/main.py", line 132, in makeWidgets
    hpaned.add2(self.makeWidgets_viewer())
  File "/home/samundra/Projects/sam_anubad/src/main.py", line 310, in makeWidgets_viewer
    self.viewer = Vi.Viewer(self)
  File "/home/samundra/Projects/sam_anubad/src/viewer.py", line 27, in __init__
    self.makeWidgets()
  File "/home/samundra/Projects/sam_anubad/src/viewer.py", line 53, in makeWidgets
    self.textview.set_top_margin(-15) # hack for next search separation '\n'
AttributeError: 'TextView' object has no attribute 'set_top_margin'
samundra@samshrestha:~/Projects/sam_anubad/src$ 
rhoit commented 8 years ago

Loading Glossary

@samundra you haven't yet loaded the glossary, its still throwing the error of invalid path.

screenshot43

if correctly loaded it will show something like.

screenshot44

Case of plugins

@nootanghimire hey can you create the page about plugins, how to add, remove, block things in wiki it will be great.

ibus

sorry, I need to fix ibus plugin, was side tracked when i update to ibus latest version and let to went to create m17n-ne.

espeak

I see you haven't yet installed espeak, need to update that in plugin dependencies.

Case of Icons

Icon aren't displayed correctly due because of the gtk3 version I'm using 3.18.xx, ubuntu and windows are still far lagging behind, there is the small section how to fix for windows in Makefile its might work for ubuntu too. And We need some one to test in ubuntu.

Here is how it should look.

screenshot45

Yup button need fixing, most of them doesn't work mostly also due to plugins.

Case of other branch

@samundra I haven't taken attention to this project for while.

dev branch is currently in stall, and kind moved into experimental for while, this is how it looks in experimental, I'm trying to integrate wordnet into it so we can access the english dictionary too.

screenshot49

samundra commented 8 years ago

@rhoit How do I load them. I have "np-l10n-glossary" cloned into src directory and then renamed it to "foss". I thought that was all the process needed to load the glossary. Did I miss anything?

I can help you to test with Ubuntu. Currently I am on Ubuntu 14.04.3 LTS. My Gtk version shows 3.10.xx

For any test purpose which branch should we use dev or experimental ?

rhoit commented 8 years ago

@samundra glossary auto loading is fixed i guess, use config..

➜  /tmp  git clone https://github.com/foss-np/anubad
Cloning into 'anubad'...
remote: Counting objects: 723, done.
remote: Total 723 (delta 0), reused 0 (delta 0), pack-reused 723
Receiving objects: 100% (723/723), 482.78 KiB | 68.00 KiB/s, done.
Resolving deltas: 100% (491/491), done.
Checking connectivity... done.
➜  /tmp  cd anubad 
➜  anubad git:(master) ./configure 
Downloading glossary
--2016-02-16 12:18:51--  https://github.com/foss-np/np-l10n-glossary/archive/current.tar.gz
Resolving github.com (github.com)... 192.30.252.128
Connecting to github.com (github.com)|192.30.252.128|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/foss-np/np-l10n-glossary/tar.gz/current [following]
--2016-02-16 12:18:54--  https://codeload.github.com/foss-np/np-l10n-glossary/tar.gz/current
Resolving codeload.github.com (codeload.github.com)... 192.30.252.162
Connecting to codeload.github.com (codeload.github.com)|192.30.252.162|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘current.tar.gz’

current.tar.gz          [       <=>            ]  79.80K  34.8KB/s   in 2.3s   

2016-02-16 12:18:59 (34.8 KB/s) - ‘current.tar.gz’ saved [81718]

np-l10n-glossary-current/
np-l10n-glossary-current/.gitignore
np-l10n-glossary-current/LICENSE
np-l10n-glossary-current/README.org
np-l10n-glossary-current/en2np/
np-l10n-glossary-current/en2np/food.tra
np-l10n-glossary-current/en2np/fun.tra
np-l10n-glossary-current/en2np/import.tsl
np-l10n-glossary-current/en2np/main.tra
np-l10n-glossary-current/en2np/ngram.tra
np-l10n-glossary-current/en2np/numbers.tra
np-l10n-glossary-current/np2en/
np-l10n-glossary-current/np2en/food.tra
np-l10n-glossary-current/np2en/main.tra
np-l10n-glossary-current/np2en/ngram.tra
np-l10n-glossary-current/np2en/people.tsl

you can try using dev or experimental post your problem i will help you though. although master is most stable.

rhoit commented 8 years ago

mostly running make will solve you problems, if you want to do manual see Makefile recipies.

screenshot50

samundra commented 8 years ago

+1 Worked flawlessly.

Here is how it looks now. I am on master branch though.

Anubad in Ubuntu

I used the manuall process to download glossary files, as per specified instructions in configure. I don't understand why that did not work. Anyway it looks great now. I think we can close this issue now.

rhoit commented 8 years ago

@samundra i did'nt realize master was so much far behind.. will close it when I finish error handling.

samundra commented 8 years ago

@rhoit When we execute it through command line Ctrl+C does not quit the application. It would be nice to have it.

:+1: Good Job.

samundra commented 8 years ago

I tried to add the signal handler but was afraid I might break something since I wasn't completely aware of the bindings :)