NatLink traceback when changing `project_root` variable
Closed this issue · 1 comments
Hello,
I am able to load the hello_world_aenea
grammar into Dragon 12 using the default json file:
{
"host": "192.168.56.1",
"port": 8240,
"platform": "proxy",
"use_multiple_actions": true,
"screen_resolution": [6400, 1440],
"project_root": "C:\\NatLink\\NatLink\\MacroSystem",
"restrict_proxy_to_aenea_client": false
}
I wanted to edit directly from my server so I setup a shared folder between my client and server which is X:\\
on my client. Soaenae.json
in C:\\NatLink\\NatLink\\MacroSystem
is:
{
"project_root": "X:\\",
}
and aenae.json
in X:\\
is
{
"host": "192.168.56.1",
"port": 8240,
"platform": "proxy",
"use_multiple_actions": true,
"screen_resolution": [6400, 1440],
"project_root": "X:\\",
"restrict_proxy_to_aenea_client": false
}
Besides that, I did not change anything. I double checked the extensions were correct, since by default Windows hides extension names.
Unfortunately this leads to a traceback error in the NatLink popup window in Dragon:
UnimacroDirectory: C:\NatLink\Unimacro
setting shiftkey to: {shift} (language: enx)
start of natlinkstartup
Vocola not active
Error loading _hello_world_aenea from C:\NatLink\NatLink\MacroSystem\_hello_world_aenea.py
Traceback (most recent call last):
File "C:\NatLink\NatLink\MacroSystem\core\natlinkmain.py", line 317, in loadFile
imp.load_module(modName,fndFile,fndName,fndDesc)
File "C:\NatLink\NatLink\MacroSystem\_hello_world_aenea.py", line 18, in <module>
from aenea import Grammar, MappingRule, Text
File "C:\NatLink\NatLink\MacroSystem\aenea\__init__.py", line 18, in <module>
import aenea.communications
File "C:\NatLink\NatLink\MacroSystem\aenea\communications.py", line 23, in <module>
import aenea.config
File "C:\NatLink\NatLink\MacroSystem\aenea\config.py", line 59, in <module>
_configuration.update(json.load(open(os.path.join(_configuration['project_root'], 'aenea.json'))))
File "C:\Python27\Lib\json\__init__.py", line 291, in load
**kw)
File "C:\Python27\Lib\json\__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "C:\Python27\Lib\json\decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python27\Lib\json\decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 3 column 1 (char 30)
-- skip unchanged wrong grammar file: C:\NatLink\NatLink\MacroSystem\_hello_world_aenea.py
-- skip unchanged wrong grammar file: C:\NatLink\NatLink\MacroSystem\_hello_world_aenea.py
natlinkmain started from C:\NatLink\NatLink\MacroSystem\core:
NatLink version: 4.1tango
DNS version: 12
Python version: 27
Windows Version: 7
Can anyone see what might be wrong?
Yeah that was really dumb. As soon as I opened up the .json
file on my local with an editor with syntax error, I realize the one-liner .json file has a comma which screws everything up :)