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

receive error during make #11

Closed
samundra opened this issue Jun 19, 2016 · 18 comments
Closed

receive error during make #11

samundra opened this issue Jun 19, 2016 · 18 comments

Comments

@samundra
Copy link
Member

I get error on dev and experimental branch during make. I didn't bother to test the master branch as it seemed to be outdated.

  1. ./configure - pulls the latest translation files
  2. make fails with following error message
    cd src; make
    make[1]: Entering directory `/home/developer/personal/anubad/src'
    ./main.py
Traceback (most recent call last):
  File "./main.py", line 23, in <module>
    import ui.home
  File "/home/developer/personal/anubad/src/ui/home.py", line 507

              ^
SyntaxError: only named arguments may follow *expression
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/developer/personal/anubad/src'
make: *** [app] Error 2

The reported error is in line number 507, https://github.com/foss-np/anubad/blob/dev/src/ui/home.py#L507

My System

Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty
@rhoit
Copy link
Member

rhoit commented Jun 19, 2016

Ya master branch is really far behind, will sync in when experimental is stable. I'm not entirely sure why that error occurred, there has been :hurtrealbad: major changes lately.. still haven't push all of it.

I'm trying to clean and refactor, in the hope 😓 its increase the readability and robustness :goberserk: Breaking changes into chucks of interpretable commits, might have 😮 missed something then, wait for new changes I 🙏 hope it fixes itself by then.

Anyways which version of 🐍 python are you using, since https://github.com/foss-np/anubad/blob/dev/src/ui/home.py#L507 shouldn't have occurred,

EDITED

restting the dev using fore push dev is experimental was diverged

@rhoit
Copy link
Member

rhoit commented Jun 19, 2016

Can you 🏁 check it again.

@samundra
Copy link
Member Author

I checked it again, but still have the same problem. the error reported is:

** (main.py:12010): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Traceback (most recent call last):
  File "src/main.py", line 31, in <module>
    import ui.home
  File "/home/developer/personal/anubad/src/ui/home.py", line 426

              ^
SyntaxError: only named arguments may follow *expression

I also tried looking for solutions but failed. I ended up in Ubuntu launchpad bug report which looks similar to the one I reported here.

The file is home.py and the error

            for key, val in FULL.items():
                self.sidebar.add_suggestion(key, val)
                self._view_item(*key, val) #426 - error points here
                treeSelection.select_path(self.sidebar.count - 1)

rhoit added a commit that referenced this issue Jun 20, 2016
seems python version only support named arguments followed
by *expression.
@rhoit
Copy link
Member

rhoit commented Jun 20, 2016

can you test again 🔁 from experimental.

rhoit added a commit that referenced this issue Jun 20, 2016
seems some python version only support named arguments followed
by *expression.
@samundra
Copy link
Member Author

after pulling in the changes from experiemental I tried running it again. This time I had the same error but on sidebar.py file. I applied the fix from https://github.com/foss-np/anubad/commit/eff5e0f98551e27c86f14192322a31c04deb14de. Then tried make again, this time I got different error:

cd src; make
make[1]: Entering directory `/home/developer/personal/anubad/src'
./main.py
Traceback (most recent call last):
  File "./main.py", line 114, in do_startup
    self.cnf = setting.main(PWD)
  File "/home/developer/personal/anubad/src/setting.py", line 141, in main
    cnf.load()
  File "/home/developer/personal/anubad/src/setting.py", line 50, in load
    self.preferences = self.extract_preferences()
  File "/home/developer/personal/anubad/src/setting.py", line 74, in extract_preferences
    pref = self['preferences']
  File "/usr/lib/python3.4/configparser.py", line 937, in __getitem__
    raise KeyError(key)
KeyError: 'preferences'
Traceback (most recent call last):
  File "./main.py", line 127, in do_activate
    self.home = self.home_create_window()
  File "./main.py", line 162, in home_create_window
    home = ui.home.Home(core, self.cnf)
AttributeError: 'App' object has no attribute 'cnf'

(main.py:8936): GLib-GIO-CRITICAL **: GApplication subclass '__main__+App' failed to chain up on ::shutdown (from end of override function)
make[1]: Leaving directory `/home/developer/personal/anubad/src'

This error is in TrayIcon class which extends GtkStatusIcon). Debug trace leads me toAppclass which does not havecnf` attribute. Looks like you forgot to initialize it 😉 . I fixed it and then now I ended up with another issue.

cd src; make
make[1]: Entering directory `/home/developer/personal/anubad/src'
./main.py
Traceback (most recent call last):
  File "./main.py", line 114, in do_startup
    self.cnf = setting.main(PWD)
  File "/home/developer/personal/anubad/src/setting.py", line 141, in main
    cnf.load()
  File "/home/developer/personal/anubad/src/setting.py", line 50, in load
    self.preferences = self.extract_preferences()
  File "/home/developer/personal/anubad/src/setting.py", line 74, in extract_preferences
    pref = self['preferences']
  File "/usr/lib/python3.4/configparser.py", line 937, in __getitem__
    raise KeyError(key)
KeyError: 'preferences'
Traceback (most recent call last):
  File "./main.py", line 127, in do_activate
    self.home = self.home_create_window()
  File "./main.py", line 162, in home_create_window
    home = ui.home.Home(core, self.cnf)
  File "/home/developer/personal/anubad/src/ui/home.py", line 57, in __init__
    self.tray     = cnf.preferences['show-on-system-tray']
AttributeError: 'NoneType' object has no attribute 'preferences'

(main.py:10540): GLib-GIO-CRITICAL **: GApplication subclass '__main__+App' failed to chain up on ::shutdown (from end of override function)
make[1]: Leaving directory `/home/developer/personal/anubad/src'

My python version: python3
Gtk version from command: dpkg -l libgtk2.0-0 libgtk-3-0

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
+++-===================-==============-==============-===========================================
ii  libgtk-3-0:amd64    3.10.8-0ubuntu amd64          GTK+ graphical user interface library
ii  libgtk2.0-0:amd64   2.24.23-0ubunt amd64          GTK+ graphical user interface library

Let me know if there is anything you would like me test 🎅

@rhoit
Copy link
Member

rhoit commented Jun 20, 2016

Still not sure what caused this error.. cnf attribute went missing, because it was never created due to this first key error.

cd src; make
make[1]: Entering directory `/home/developer/personal/anubad/src'
./main.py
Traceback (most recent call last):
  File "./main.py", line 114, in do_startup
    self.cnf = setting.main(PWD)
  File "/home/developer/personal/anubad/src/setting.py", line 141, in main
    cnf.load()
  File "/home/developer/personal/anubad/src/setting.py", line 50, in load
    self.preferences = self.extract_preferences()
  File "/home/developer/personal/anubad/src/setting.py", line 74, in extract_preferences
    pref = self['preferences']
  File "/usr/lib/python3.4/configparser.py", line 937, in __getitem__
    raise KeyError(key)
KeyError: 'preferences'

this is not suppose to happen.. 😬, looking into it.

rhoit added a commit that referenced this issue Jun 20, 2016
object seems to be incompltely created for some unknown cause, until
=__init__= was declared.
rhoit added a commit that referenced this issue Jun 20, 2016
its cause problem with the old gtk version
@rhoit
Copy link
Member

rhoit commented Jun 20, 2016

@samundra can you check it now

rhoit added a commit that referenced this issue Jun 20, 2016
object seems not to be created completely for some unknown reason, until
=__init__= was declared.
@samundra
Copy link
Member Author

I checked with the latest code base experimental and still have the same kind of errors.

cd src; make
make[1]: Entering directory `/home/developer/personal/anubad/src'
./main.py
Traceback (most recent call last):
  File "./main.py", line 31, in <module>
    import ui.home
  File "/home/developer/personal/anubad/src/ui/home.py", line 19, in <module>
    import sidebar
  File "/home/developer/personal/anubad/src/ui/sidebar.py", line 33
    self.dictstore[self.count] = (*key, value)
                                         ^
SyntaxError: can use starred expression only as assignment target
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/developer/personal/anubad/src'
make: *** [app] Error 2

I applied the same patch from here, eff5e0f

Then I ended up with another error.

cd src; make
make[1]: Entering directory `/home/developer/personal/anubad/src'
./main.py
glossary: ~/.cache/anubad/gloss/foss/en2np/ 3675
glossary: ~/.cache/anubad/gloss/foss/np2en/ 81
Traceback (most recent call last):
  File "./main.py", line 119, in do_startup
    self.plugins = { k: v for k, v in scan_plugins(self.cnf) }
  File "./main.py", line 119, in <dictcomp>
    self.plugins = { k: v for k, v in scan_plugins(self.cnf) }
  File "./main.py", line 272, in scan_plugins
    namespace = importlib.__import__(file_name[:-3])
  File "<frozen importlib._bootstrap>", line 2334, in __import__
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/developer/personal/anubad/src/../plugins/linux.py", line 10, in <module>
    gi.require_version('Keybinder', '3.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 79, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Keybinder not available
Traceback (most recent call last):
  File "./main.py", line 126, in do_activate
    self.home = self.home_create_window()
  File "./main.py", line 163, in home_create_window
    home.set_icon(self.pixbuf_logo)
AttributeError: 'App' object has no attribute 'pixbuf_logo'
^[^Cmake[1]: *** [all] Interrupt
make: *** [app] Interrupt

You see I intentionally interrupted the process as it was just sitting there doing nothing.

By the way, I am currently using gnome3 as my DE does it makes any difference?

Looks like we are at least getting through it now. 👍

@rhoit
Copy link
Member

rhoit commented Jun 21, 2016

🎉 you are almost done problem is due to plugin 🔌 now,
remove the plugins/linux.py problem is cause due to incomplete libkeybinder3 dependency, which I added recently, need to auto disable, for that need to change the plugin architecture.

or start it with

$ anubad --noplugins

@samundra
Copy link
Member Author

executed following:

python3 src/main.py --noplugins

and got the following output:

glossary: ~/.cache/anubad/gloss/foss/en2np/ 3675
glossary: ~/.cache/anubad/gloss/foss/np2en/ 81
Traceback (most recent call last):
  File "src/main.py", line 126, in do_activate
    self.home = self.home_create_window()
  File "src/main.py", line 176, in home_create_window
    encoding = "UTF-8"
FileNotFoundError: [Errno 2] No such file or directory: '/home/developer/.cache/anubad/history'

Looks to be clean now some final cleanup remains :) 🎯 👍

@rhoit
Copy link
Member

rhoit commented Jun 21, 2016

for quick fix just create the history file

$ touch /home/developer/.cache/anubad/history

or

  $ anubad --noplugin --nohistfile

will fix that problem in following commit.

@rhoit
Copy link
Member

rhoit commented Jun 22, 2016

can you test again ♻️ earlier issues should not occur now.. plugin should load smoothly now, even if there is the error ❗, lets hope this branch become stable, i can freeze the dev, or update master

@samundra
Copy link
Member Author

✨ ✨ Screenshot

anubad - _001

🏁 👍
it looks good now. It gave a error Error occured during loading plugin number2word other than that its fine.

Here is the dump running from command line:

cd src; make
make[1]: Entering directory `/home/developer/personal/anubad/src'
./main.py
glossary: ~/.cache/anubad/gloss/foss/en2np/ 3675
glossary: ~/.cache/anubad/gloss/foss/np2en/ 81
Traceback (most recent call last):
  File "./main.py", line 276, in scan_plugins
    namespace = importlib.__import__(name)
  File "<frozen importlib._bootstrap>", line 2334, in __import__
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/developer/personal/anubad/src/../plugins/linux.py", line 10, in <module>
    gi.require_version('Keybinder', '3.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 79, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Keybinder not available
Traceback (most recent call last):
  File "./main.py", line 287, in load_plugins
    if plug.plugin_main(app, PWD):
AttributeError: 'NoneType' object has no attribute 'plugin_main'
plugin: tricks
Traceback (most recent call last):
  File "./main.py", line 287, in load_plugins
    if plug.plugin_main(app, PWD):
  File "/home/developer/personal/anubad/src/../plugins/number2word.py", line 116, in plugin_main
    gloss = app.home.core.Glossary.instances[path + 'en2ne/']
KeyError: '~/.cache/anubad/gloss/foss/en2ne/'
plugin: espeak
shutdown: update history

(main.py:9360): GLib-GIO-CRITICAL **: GApplication subclass '__main__+App' failed to chain up on ::shutdown (from end of override function)
make[1]: Leaving directory `/home/developer/personal/anubad/src'

The window appears and can be used as usual.

@rhoit
Copy link
Member

rhoit commented Jun 22, 2016

😭 nice to see icons are correctly displayed, UI font seems too be bit off, in that theme. mine looks something like this.

screenshot128

plugin breakage is due to unsynced glossary, and libkeybinder will be fixed soon.

P.S. above is the screenshot of number2word plugin 😎

@samundra
Copy link
Member Author

Looks good. I think we can close this issue now and free the master branch 👍 🎆

rhoit added a commit that referenced this issue Jun 22, 2016
@rhoit
Copy link
Member

rhoit commented Jun 22, 2016

hey @samundra do you like to handle the releases, I'm not sure where to freeze and release, and what to complete.

@rhoit rhoit closed this as completed Jun 22, 2016
@samundra
Copy link
Member Author

@rhoit IMHO, we can freeze the code now and bump up the version to 0.96-2

Are you following any specific tagging schema for the versioning?

@rhoit
Copy link
Member

rhoit commented Jun 22, 2016

0.96-2
[major version]-[minor release]

major version: reflect major changes
minor version: number denoted for important changes which cannot wait major release.

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