zeitgeitst-datahub showing: "IndexError: list index out of range"

Asked by Mario Marín

I got the code from bzr, the last revision from the log is 1505. After I installed zeitgeist I ran:

python zeitgeist-daemon.py
python zeitgeist-datahub.py

In different terminals. zeitgeist-daemon seems to capture events correctly but there is something wrong with zeitgeist-datahub, here is the terminal output:

=====================================
FROM: python zeitgeist-daemon.py
=====================================
DEBUG:zeitgeist.engine:daemon is configured to run with these extensions: ['_zeitgeist.engine.extensions.blacklist.Blacklist', '_zeitgeist.engine.extensions.datasource_registry.DataSourceRegistry']
INFO:zeitgeist.sql:Using database: /home/mario/.local/share/zeitgeist/activity.sqlite
DEBUG:zeitgeist.sql:Core schema is good. DB loaded in 1.78217887878ms
DEBUG:zeitgeist.extension:Loading extension 'Blacklist'
DEBUG:zeitgeist.blacklist:No existing blacklist config found
DEBUG:zeitgeist.extension:Loading extension 'DataSourceRegistry'
DEBUG:zeitgeist.datasource_registry:Loaded data-source data from /home/mario/.local/share/zeitgeist/datasources.pickle
DEBUG:root:Checking for another running instance...
DEBUG:root:No running instances found.
INFO:root:Starting Zeitgeist service...

=====================================
FROM: python zeitgeist-datahub.py
=====================================
DEBUG:root:Updating database with new Recently Used Documents items
Traceback (most recent call last):
  File "zeitgeist-datahub.py", line 108, in _update_db_async
    events = self._sources_queue[0].get_items()
  File "/home/mario/zeitgeist/zeitgeist/zeitgeist/../_zeitgeist/loggers/zeitgeist_base.py", line 81, in get_items
    return self._get_items()
  File "/home/mario/zeitgeist/zeitgeist/zeitgeist/../_zeitgeist/loggers/datasources/recent.py", line 293, in _get_items
    desktopfile = self._find_desktop_file_for_application(application)
  File "/home/mario/zeitgeist/zeitgeist/zeitgeist/../_zeitgeist/loggers/datasources/recent.py", line 265, in _find_desktop_file_for_application
    line.split("=", 1)[-1].strip().split()[0] == \
IndexError: list index out of range

What am I doing wrong?

Initially, from ppa packages on two different computers, GAJ did not show any entries, just "pinned items". I ran these commands because I saw the answer to question #99109, no luck with any version (ppa or bazar).

Thanks in advanced.

Question information

Language:
English Edit question
Status:
Solved
For:
Zeitgeist Framework Edit question
Assignee:
No assignee Edit question
Solved by:
Siegfried Gevatter
Solved:
Last query:
Last reply:
Revision history for this message
Siegfried Gevatter (rainct) said :
#1

Hi.

It looks like you have a malformed .desktop file.

I've pushed a change (revision 1506) for zeitgeist-datahub to ignore such errors. Can you please confirm that this fixes the problem?

Revision history for this message
Mario Marín (mmfmarin) said :
#2

No, it doesn't. Here is the new output for python zeitgeist-datahub.py:

=====================================
FROM: python zeitgeist-datahub.py
=====================================

DEBUG:root:Updating database with new Recently Used Documents items
WARNING:zeitgeist.logger.datasources.recent:Corrupt .desktop file; Python traceback: list index out of range
=====================================
... the terminal shows the last line another 18 times.
=====================================

The terminal output from: FROM: python zeitgeist-daemon.py is the same.

I saw you reported a bug ¿should I post the terminal outputs and move the discussion there?

Revision history for this message
Best Siegfried Gevatter (rainct) said :
#3

But do the items show up now? (the error message is supposed to be displayed; although I've changed it now to print the name of the affected file; if you look at them I think they'll have a line like "Exec=" without anything after the equal sign).

Revision history for this message
Mario Marín (mmfmarin) said :
#4

Thanks Siegfried Gevatter, that solved my question.

Revision history for this message
Mario Marín (mmfmarin) said :
#5

Yes, the items show up now.

Thanks it solved my problem ¿should I do anything about the affected file?

Revision history for this message
Siegfried Gevatter (rainct) said :
#6

Great!

If you want you can fix the files or remove them but this shouldn't affect Zeitgeist.

Thank you for your report and helping improve Zeitgeist.