kspi / dmenu-frecency

A dmenu-based desktop application launcher
MIT License
33 stars 8 forks source link

ValueError: "No closing quotation error" raised on first run #15

Closed fogine closed 8 years ago

fogine commented 8 years ago

The error is probably triggered by:

with gzip.open(cls.STATE_FILENAME, 'rb') as f: #line 163

because it's trying to process file ~/.config/dmenu-frecency/state which does not exists.

Stack trace:

Traceback (most recent call last):
  File "./dmenu-frecency", line 329, in <module>
    DmenuFrecency(arguments).main()
  File "./dmenu-frecency", line 271, in __init__
    self.state = LauncherState.load(self.config)
  File "./dmenu-frecency", line 184, in load
    return cls(config)
  File "./dmenu-frecency", line 105, in __init__
    self.find_apps()
  File "./dmenu-frecency", line 206, in find_apps
    self.add_desktop(full_filename)
  File "./dmenu-frecency", line 231, in add_desktop
    command_line=get_command(d),
  File "./dmenu-frecency", line 73, in get_command
    for token in shlex.split(desktop_entry.getExec()):
  File "/usr/lib/python2.7/shlex.py", line 279, in split
    return list(lex)
  File "/usr/lib/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/usr/lib/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/usr/lib/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
ValueError: No closing quotation
kspi commented 8 years ago

Seems like you have a .desktop file that shlex can't parse. Try the latest master (8035cb0) - it should display the filename in the terminal.

fogine commented 8 years ago

You're right, one file had ridiculous name What's new.desktop. It shows the warning. Thank you.