Forums Search Login Register
Login
Username
Password
New Posts Todays Posts Find Users Posts Unanswered Threads Help Mark Forums as Read

Thread Options  Subscribe to this thread Subscribed Users  Add Reply 
Posts: 1,326
Trophies:
1
I am getting the following error when running a Python script:


Code:
[email protected]:~/.local/share/gedit/plugins$ python intelligent_text_completion.py
intelligent_text_completion.py:13: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GObject, Gedit, PeasGtk
Traceback (most recent call last):
  File "intelligent_text_completion.py", line 13, in
    from gi.repository import Gtk, GObject, Gedit, PeasGtk
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 133, in load_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name Gedit, introspection typelib not found


I tried running sudo apt-get install gedit and I also installed gtk2.0+ and gtk3.0+ and nothing seems to work. I did also ran sudo apt-get install python-gi. Interestingly, I'm able to import GObject but not Gedit:

Code:
[email protected]:~/.local/share/gedit/plugins$ python intelligent_text_completion.py
intelligent_text_completion.py:13: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GObject, Gedit, PeasGtk
Traceback (most recent call last):
  File "intelligent_text_completion.py", line 13, in
    from gi.repository import Gtk, GObject, Gedit, PeasGtk
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 133, in load_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name Gedit, introspection typelib not found
I have no idea what to do. Can anyone help?
10-03-2020, 12:13 PM
Reply
Subscribe to this thread Subscribed Users  Add Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [ubuntu] script email shell bfrankgonzaluuu 0 10 10-14-2020 07:13 AM
Last Post: bfrankgonzaluuu
  [ubuntu] How can I run a logout script whenever I log out? oharrisonholmesh 0 3 10-01-2020 02:39 PM
Last Post: oharrisonholmesh
  [ubuntu] Wifi unable to connect after failed docer install attempt orileekidd 0 7 09-26-2020 02:04 PM
Last Post: orileekidd
  Store JSON Data in local Storage (Java Script) QuailC1945 0 10 09-16-2020 05:22 PM
Last Post: QuailC1945
  [ubuntu] Unable to copy files from USB in Standard Account DominiqueM1950 0 19 09-10-2020 02:09 PM
Last Post: DominiqueM1950
  [ubuntu] pdftk "Error: Unable to find file." on ubuntu 20.04 wsusannahmccyyy 0 22 09-04-2020 06:44 PM
Last Post: wsusannahmccyyy
  Computer restarts when I want to reboot; Grub script error? linlynn80 0 20 08-31-2020 07:44 PM
Last Post: linlynn80
  [ubuntu] post 20.04 install, unable to login vbasilshawh 0 31 07-07-2020 01:50 AM
Last Post: vbasilshawh
  [ubuntu] Unable to boot following attempted dual boot install Mac Tramp 0 31 07-03-2020 07:50 AM
Last Post: Mac Tramp
  [all variants] Gparted unable to shrink ntfs partition and crashes sbrantalvarmmoe 0 31 06-16-2020 09:46 AM
Last Post: sbrantalvarmmoe

Forum Jump:



User(s) browsing this thread: 1 Guest(s)



Contact Us Privacy Policy Top RSS
Forum Software By: MyBB, © 2002-2020