{"action":"created","issue":{"url":"https://api.github.com/repos/synkarius/caster/issues/61","labels_url":"https://api.github.com/repos/synkarius/caster/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/synkarius/caster/issues/61/comments","events_url":"https://api.github.com/repos/synkarius/caster/issues/61/events","html_url":"https://github.com/synkarius/caster/issues/61","id":90010866,"number":61,"title":"Initialization fails if the settings file already exists","user":{"login":"Versatilus","id":12213877,"avatar_url":"https://avatars.githubusercontent.com/u/12213877?v=3","gravatar_id":"","url":"https://api.github.com/users/Versatilus","html_url":"https://github.com/Versatilus","followers_url":"https://api.github.com/users/Versatilus/followers","following_url":"https://api.github.com/users/Versatilus/following{/other_user}","gists_url":"https://api.github.com/users/Versatilus/gists{/gist_id}","starred_url":"https://api.github.com/users/Versatilus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Versatilus/subscriptions","organizations_url":"https://api.github.com/users/Versatilus/orgs","repos_url":"https://api.github.com/users/Versatilus/repos","events_url":"https://api.github.com/users/Versatilus/events{/privacy}","received_events_url":"https://api.github.com/users/Versatilus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/synkarius/caster/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-22T04:54:20Z","updated_at":"2015-06-22T23:45:16Z","closed_at":"2015-06-22T10:18:04Z","body":"When I first initialize the Caster installation it loads without major issues. The settings file is created and saved to the disk. When I restart Dragon, however, you can see from the log that it fails to load with a very bizarre error. I've had my fill of the weird for tonight, so I'm leaving this here for you to ponder. It really has me scratching my head.\r\n\r\n**initialization success**\r\n```\r\nIOError: Could not find settings file: C:\\NatLink\\NatLink\\MacroSystem\\caster\\bin\\data\\settings.json\r\nInitializing file...\r\n\r\n\r\nsettings values changed:  75\r\n*- Starting Caster v 0.4.7 -*\r\n\r\nAttempting to load CCR anyway...\r\n<type 'exceptions.TypeError'>\r\n'NoneType' object has no attribute '__getitem__'\r\n<traceback object at 0x0D656C38>\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\_caster.py\", line 47, in <module>\r\n    recording.load_alias_rules()\r\n\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\caster\\lib\\recording.py\", line 94, in load_alias_rules\r\n    rewrite_alias_module(None, None)\r\n\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\caster\\lib\\recording.py\", line 66, in rewrite_alias_module\r\n    if match_object[0][0]==a[0]:\r\n```\r\n\r\n**initialization failure**\r\n```\r\n*- Starting Caster v 0.4.7 -*\r\n\r\nAttempting to load CCR anyway...\r\n<type 'exceptions.TypeError'>\r\n'NoneType' object has no attribute '__getitem__'\r\n<traceback object at 0x0D545CD8>\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\_caster.py\", line 47, in <module>\r\n    recording.load_alias_rules()\r\n\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\caster\\lib\\recording.py\", line 94, in load_alias_rules\r\n    rewrite_alias_module(None, None)\r\n\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\caster\\lib\\recording.py\", line 66, in rewrite_alias_module\r\n    if match_object[0][0]==a[0]:\r\n\r\nError loading _caster from C:\\NatLink\\NatLink\\MacroSystem\\_caster.py\r\nTraceback (most recent call last):\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\core\\natlinkmain.py\", line 340, in loadFile\r\n    imp.load_module(modName,fndFile,fndName,fndDesc)\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\_caster.py\", line 82, in <module>\r\n    class MainRule(MappingRule):\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\_caster.py\", line 156, in MainRule\r\n    generate_CCR_choices.__func__()\r\n  File \"C:\\NatLink\\NatLink\\MacroSystem\\_caster.py\", line 89, in generate_CCR_choices\r\n    return Choice(\"ccr_mode\", choices)\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\grammar\\elements_compound.py\", line 323, in __init__\r\n    child = Compound(spec=k, value=v, extras=extras)\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\grammar\\elements_compound.py\", line 270, in __init__\r\n    element = self._parser.parse(spec)\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 52, in parse\r\n    for result in generator:\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 413, in parse\r\n    try: path[-1].next()\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 472, in parse\r\n    try: path[-1].next()\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 413, in parse\r\n    try: path[-1].next()\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 547, in parse\r\n    for result in child.parse(state):\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 413, in parse\r\n    try: path[-1].next()\r\n  File \"c:\\programming\\dragonfly\\dragonfly\\parser.py\", line 708, in parse\r\n    while not state.finished() and state.peek(1) in self._set:\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 52: ordinal not in range(128)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/synkarius/caster/issues/comments/114304939","html_url":"https://github.com/synkarius/caster/issues/61#issuecomment-114304939","issue_url":"https://api.github.com/repos/synkarius/caster/issues/61","id":114304939,"user":{"login":"Versatilus","id":12213877,"avatar_url":"https://avatars.githubusercontent.com/u/12213877?v=3","gravatar_id":"","url":"https://api.github.com/users/Versatilus","html_url":"https://github.com/Versatilus","followers_url":"https://api.github.com/users/Versatilus/followers","following_url":"https://api.github.com/users/Versatilus/following{/other_user}","gists_url":"https://api.github.com/users/Versatilus/gists{/gist_id}","starred_url":"https://api.github.com/users/Versatilus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Versatilus/subscriptions","organizations_url":"https://api.github.com/users/Versatilus/orgs","repos_url":"https://api.github.com/users/Versatilus/repos","events_url":"https://api.github.com/users/Versatilus/events{/privacy}","received_events_url":"https://api.github.com/users/Versatilus/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T23:45:16Z","updated_at":"2015-06-22T23:45:16Z","body":"I don't know what broke, but after freshly reinstalling Natlink and all of its dependencies, Caster works perfectly."}}