-1

Working with some people to build a fake news detecting program and have made some great progress but out of 5 members of the group only 1 person can run the python program. I am running a clean install of Ubuntu 16.04 that is only a few hours old and the person who can run the program has Fedora 26. The error I get when trying to run the program is:

conesco3@Conesco3:~/Documents/Alternative-News-Checker$ sudo python main.py[sudo] password for conesco3: Traceback (most recent call last): File "main.py", line 6, in <module> gi.require_version('Gtk', '3.0') AttributeError: 'module' object has no attribute 'require_version'

I went away and installed gtk+-3.0 with: sudo apt install gtk+-3.0

Which doesn't help.

I also installed Glade which made the UI part of the program to try and fix it but with no joy.

The files can be found here if you want to try and recreate the problem, I am stumped so any help is appreciated and I have tried several other suggestions for fixes like installing python-gobject and they haven't fixed the problem - "https://github.com/WeMightNotHaveTheGuts/Alternative-News-Checker"

EDIT @Rawing - hello.py - small example

Neil Boyd
  • 1
  • 2
  • Please include the relevant code _in the question itself_. Nobody wants to dig through your github repo to figure out where the problem is or how to even start your program. – Aran-Fey Oct 29 '17 at 08:56
  • @Rawing The problem with that is that there are so many files attached onto main.py - I can add it however I don't know if that will make things any easier. – Neil Boyd Oct 29 '17 at 09:03
  • 1
    The error happens on line 6. Surely you'll manage to write a short 6-line program that demonstrates the same problem as the original program? Please see [mcve]. – Aran-Fey Oct 29 '17 at 09:06
  • Yes I know the error happens on Line 6 this is what I am saying I know it has to do with GTK+-3.0 and this is installed on my system and up to date. We have tried it with other examples and there is the same error. – Neil Boyd Oct 29 '17 at 09:17
  • @Rawing There is a screenshot of the problem with a smaller example. – Neil Boyd Oct 29 '17 at 09:48

1 Answers1

0

Posted the question in the Ubuntu stack exchange was given an answer. The problem was that a package called gi was installed and overwriting the python-gi package. Problem was solved by uninstalling gi with pip and making sure python-gi was installed then it ran. Answer can be found here - https://askubuntu.com/questions/970539/how-do-i-fix-module-object-has-no-attribute-required-version-for-gi-requi/971022#971022

Neil Boyd
  • 1
  • 2