jay823001 / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

autokey.json is not created #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  1. Install AutoKey.
  2. Run AutoKey.

What is the expected output? What do you see instead?
  Fatal error starting AutoKey.
  [Errno 2] No such file or directory: '/home/alan/.config/autokey/autokey.json'

What version of the product are you using? On what operating system?
  AutoKey 0.7.2 (gtk), Ubuntu 9.10 (64 bit pc)

Please provide any additional information below.
  Creating the file just causes a different error:
  Fatal error starting AutoKey.
  No JSON object could be decoded

Original issue reported on code.google.com by tehal...@gmail.com on 16 Mar 2011 at 8:40

GoogleCodeExporter commented 9 years ago
This error is logically impossible; the code first checks for the existence of 
the file before trying to open it. You must have some kind of permissions 
problem.

I'll need more detailed log output - see the Wiki on how to get it.

Original comment by cdekter on 17 Mar 2011 at 3:49

GoogleCodeExporter commented 9 years ago
INFO - root - Initialising application
INFO - config-manager - Loading config from legacy file: 
/home/alan/.config/autokey/autokey.bin
INFO - config-manager - Upgrading v0.5x config file to v0.6x
ERROR - root - Fatal error starting AutoKey: [Errno 2] No such file or 
directory: '/home/alan/.config/autokey/autokey.json'
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/autokey/gtkapp.py", line 78, in __init__
    self.initialise(options.configure)
  File "/usr/lib/python2.6/dist-packages/autokey/gtkapp.py", line 115, in initialise
    self.configManager = get_config_manager(self)
  File "/usr/lib/python2.6/dist-packages/autokey/configmanager.py", line 164, in get_config_manager
    return load_legacy_config(autoKeyApp)
  File "/usr/lib/python2.6/dist-packages/autokey/configmanager.py", line 143, in load_legacy_config
    upgrade_config_file()
  File "/usr/lib/python2.6/dist-packages/autokey/configmanager.py", line 223, in upgrade_config_file
    shutil.move(CONFIG_FILE, CONFIG_FILE + "-0.5x")
  File "/usr/lib/python2.6/shutil.py", line 264, in move
    copy2(src, real_dst)
  File "/usr/lib/python2.6/shutil.py", line 99, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: 
'/home/alan/.config/autokey/autokey.json'

Original comment by tehal...@gmail.com on 17 Mar 2011 at 4:28

GoogleCodeExporter commented 9 years ago
Caused by a misnamed variable at line 223-225 of configmanager.py. If you 
change the offending lines to this:

    shutil.move(CONFIG_FILE_OLD, CONFIG_FILE_OLD + "-0.5x")
    infile = open(CONFIG_FILE_OLD + "-0.5x", 'rb')
    outfile = open(CONFIG_FILE_OLD, 'wb')

That should correct the problem.

Original comment by cdekter on 17 Mar 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Fixed in v0.71.3

Original comment by cdekter on 31 Mar 2011 at 10:32