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

Developer install - ImportError: cannot import name NetworkManager, introspection typelib not found #175

Closed
michaelmcandrew opened this issue Oct 18, 2015 · 7 comments
Labels
bug priority:critical reproducible-in-git Issues that affect the current dev version

Comments

@michaelmcandrew
Copy link

Hello there,

I'm trying to get a development environment set up to write a small plugin.

Installing from master on ubuntu 15,04 and following the instructions here: https://github.com/getting-things-gnome/gtg I get to this instruction.

RUN: In order to run GTG from this Developers repository, you need to launch the debug.sh script:

$ ./gtg.sh

But I get an error.

10:29:24 michael@xps13:~/gtg$ ./gtg.sh 
Setting XDG vars to use default dataset.
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./GTG/gtg", line 62, in <module>
    from GTG.gtk.manager import Manager
  File "/home/michael/gtg/GTG/gtk/manager.py", line 26, in <module>
    from GTG.gtk.browser.browser import TaskBrowser
  File "/home/michael/gtg/GTG/gtk/browser/browser.py", line 34, in <module>
    from GTG.gtk.browser.custominfobar import CustomInfoBar
  File "/home/michael/gtg/GTG/gtk/browser/custominfobar.py", line 26, in <module>
    from GTG.tools.networkmanager import is_connection_up
  File "/home/michael/gtg/GTG/tools/networkmanager.py", line 23, in <module>
    from gi.repository import NetworkManager, NMClient
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 53, in find_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name NetworkManager, introspection typelib not found

Am I missing a step?

Thanks!

@dragon788
Copy link

You may need to install the gobject-introspection and gir1.2-gtk3.0 packages as well as gir1.2-networkmanager-1.0.

@diegogangl
Copy link
Contributor

I'm getting the same error, but can't find those packages in Fedora 31. Is there any way to try gtg with a current fedora?

@nekohayo
Copy link
Member

Hi @diegogangl you can use the Flatpak package mentioned in #210 (comment) for now (at least until we bring things back in order)...

@nekohayo
Copy link
Member

I suspect this would have been fixed by @ploum's commit 83324a8 ? Reopen otherwise.

@nekohayo nekohayo added this to the 0.4 "Work of love" milestone Dec 12, 2019
@nekohayo nekohayo added bug priority:critical reproducible-in-git Issues that affect the current dev version labels Dec 12, 2019
@JaneSmith
Copy link

JaneSmith commented Jan 13, 2020

I'm getting the same error with master, except in my case it is "NM" instead of "NetworkManager", and line 133 instead of 53:

File "/usr/lib64/python3.7/site-packages/gi/importer.py", line 133, in load_module 'introspection typelib not found' % namespace)
ImportError: cannot import name NM, introspection typelib not found

Trying to build it on Fedora Silverblue 31 inside a Fedora Toolbox container. I've installed python-pip3, the requirements.txt dependencies, python3-pyxdg, python3-dbus, and python3-gobject in the container, all of which were necessary to get past other errors. I am unsure how to deal with this error.

@JaneSmith
Copy link

Sorry for the spam. I managed to solve it by installing NetworkManager-libnm-devel. In case it helps anyone else, here is a full list of steps to get a development environment set up on Fedora Silverblue / Fedora Toolbox.

To create a development environment:

git clone https://github.com/getting-things-gnome/gtg.git ~/Projects/gtg
toolbox create -c gtg
toolbox enter -c gtg
sudo dnf install python-pip3 python3-pyxdg python3-dbus python3-gobject NetworkManager-libnm-devel
cd ~/Projects/gtg
pip3 install -r requirements.txt
exit

To enter the development environment and run the software:

toolbox enter -c gtg
cd ~/Projects/gtg
./gtg.sh

To exit the development environment:

exit

To discard the development environment:

toolbox rm -f gtg
rm -r ~/Projects/gtg

@nekohayo
Copy link
Member

Thank you Jane! I'll try to remember to integrate your findings into the scattered developer documentation/instructions/etc. as I review those to see if I can make it easier for people to get started for contributing (ticket #200).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority:critical reproducible-in-git Issues that affect the current dev version
Projects
None yet
Development

No branches or pull requests

5 participants