Not able to start Variety 0.5.0 due to broken smart_user.json

Bug #1409092 reported by Mark Rich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Variety
Fix Released
Critical
Peter Levi

Bug Description

Since updating to this new release I have been unable to start the program on my system.
I am using Ubuntu 14.10 with Unity and all available updates installed.

This is the result of running variety from the command prompt.

markrich@markys-home-pc:/opt/extras.ubuntu.com/variety/bin$ ./variety -v
INFO: 2015-01-09 18:34:40,063: perform_upgrade() 'Last run version was 0.5.0 or earlier, current version is 0.5.0'
INFO: 2015-01-09 18:34:40,063: process_command() 'Received command: [u'-v']'
INFO: 2015-01-09 18:34:40,064: load_banned() 'Missing or invalid banned URLs list, no URLs will be banned'
INFO: 2015-01-09 18:34:40,069: load() 'Jumble loading'
INFO: 2015-01-09 18:34:40,069: _walk_modules() 'Jumble loading module in __init__ from /opt/extras.ubuntu.com/variety/share/variety/plugins/__init__.py'
INFO: 2015-01-09 18:34:40,069: _walk_modules() 'Jumble loading module in QuotesDaddySource from /opt/extras.ubuntu.com/variety/share/variety/plugins/quotes/QuotesDaddySource.py'
INFO: 2015-01-09 18:34:40,069: load() 'Jumble found plugin class: <class 'QuotesDaddySource.QuotesDaddySource'>: {'author': 'Peter Levi', 'name': 'QuotesDaddy', 'version': '0.1', 'description': u"Fetches quotes from QuotesDaddy's daily quotes RSS feed.\nDoes not support searching by tags or authors."}'
INFO: 2015-01-09 18:34:40,070: _walk_modules() 'Jumble loading module in GoodreadsSource from /opt/extras.ubuntu.com/variety/share/variety/plugins/quotes/GoodreadsSource.py'
INFO: 2015-01-09 18:34:40,074: load() 'Jumble found plugin class: <class 'GoodreadsSource.GoodreadsSource'>: {'author': 'Peter Levi', 'name': 'Goodreads', 'version': '0.1', 'description': u'Fetches quotes from Goodreads.com'}'
INFO: 2015-01-09 18:34:40,074: _walk_modules() 'Jumble loading module in __init__ from /opt/extras.ubuntu.com/variety/share/variety/plugins/quotes/__init__.py'
INFO: 2015-01-09 18:34:40,074: _walk_modules() 'Jumble loading module in QuotationsPageSource from /opt/extras.ubuntu.com/variety/share/variety/plugins/quotes/QuotationsPageSource.py'
INFO: 2015-01-09 18:34:40,074: load() 'Jumble found plugin class: <class 'QuotationsPageSource.QuotationsPageSource'>: {'author': 'Peter Levi', 'name': 'TheQuotationsPage.com', 'version': '0.1', 'description': u'Fetches quotes from TheQuotationsPage.com'}'
INFO: 2015-01-09 18:34:40,074: _walk_modules() 'Jumble loading module in LocalFilesSource from /opt/extras.ubuntu.com/variety/share/variety/plugins/quotes/LocalFilesSource.py'
INFO: 2015-01-09 18:34:40,074: load() 'Jumble found plugin class: <class 'LocalFilesSource.LocalFilesSource'>: {'author': 'Peter Levi', 'name': 'Local text files', 'version': '0.1', 'description': u'Displays quotes, defined in local text files.\nPut your own txt files in: ~/.config/variety/pluginconfig/quotes/.\nThe file format is:\n\nquote -- author\n.\nsecond quote -- another author\n.\netc...\n\nExample: http://rvelthuis.de/zips/quotes.txt'}'
Traceback (most recent call last):
  File "./variety", line 41, in <module>
    variety.main()
  File "/opt/extras.ubuntu.com/variety/variety/__init__.py", line 141, in main
    window.start(arguments)
  File "/opt/extras.ubuntu.com/variety/variety/VarietyWindow.py", line 162, in start
    self.smart = Smart(self)
  File "/opt/extras.ubuntu.com/variety/variety/Smart.py", line 62, in __init__
    self.load_user(create_if_missing=False)
  File "/opt/extras.ubuntu.com/variety/variety/Smart.py", line 103, in load_user
    self.user = AttrDict(json.loads(data))
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
markrich@markys-home-pc:/opt/extras.ubuntu.com/variety/bin$

Related branches

Revision history for this message
Mark Rich (sir-marky) wrote :
Revision history for this message
Peter Levi (peterlevi) wrote :

Please check if a file named "smart_user.json" exists in your ~/.config/variety folder.
Does it contain info like this, or it looks broken in some way:

{
    "authkey": "xxxxxxxxxxxxxxxxxxx",
    "username": "xxxxxxxxxxx",
    "machine_id": "xxxxxxxxx",
    "id": "xxxxxxxxxxx",
    "machine_label": "Ubuntu 12.04"
}

It seems by the exception that Variety finds the file, but cannot parse it, it might have been broken during some power failure in an improper moment. If you are not concerned about me knowing your VRTY profile, please email me the file to peterlevi <at> peterlevi.com. Thanks.

Peter Levi (peterlevi)
summary: - No longer able to start Variety after updating to 0.5.0
+ Not able to start Variety 0.5.0 due to broken smart_user.json
Changed in variety:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Peter Levi (peterlevi)
Revision history for this message
Mark Rich (sir-marky) wrote :

This file appears to be empty.

Revision history for this message
Mark Rich (sir-marky) wrote :

Additonal. I renamed the file with .OLD at the end and this time Variety started first time.
I will monitor and see if this happens again.

Peter Levi (peterlevi)
Changed in variety:
milestone: none → 0.5.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.