Using VisCCG, I just can edit a ccg file, nothing else.
Every other action (e.g. validate, visualize Lexicon, Words or Rules) causes an exception, e.g. validating:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files (x86)\Python27\lib\lib-tk\Tkinter.py", line 1536, in
call
return self.func(*args)
File "D:\Projekte\PAL\openccg/bin/ccg_editor.py", line 151, in <lambda>
vldButton = Button (btnFrame, text='Validate', command = lambda: self.onVali
date(editFrame, cfile))
File "D:\Projekte\PAL\openccg/bin/ccg_editor.py", line 241, in onValidate
cfile.compile_if_needed()
File "D:\Projekte\PAL\openccg/bin/ccg_editor.py", line 1317, in compile_if_nee
ded
self.curparse = ccg2xml.parse_string(text)
File "D:\Projekte\PAL\openccg\bin\ccg2xml.py", line 3333, in parse_string
retval.parse = yacc.parse(str, lexer=MacroLexer(globallexer))
File "D:\Projekte\PAL\openccg\bin\yacc.py", line 181, in parse
lexer.input(input)
File "D:\Projekte\PAL\openccg\bin\ccg2xml.py", line 3173, in input
self.lexer.input(s)
File "D:\Projekte\PAL\openccg\bin\lex.py", line 255, in input
raise ValueError, "Expected a string"
ValueError: Expected a string
Onboard: Python 2.7 and JDK 1.7.0_79 (32bit).
Can you give me a hint? Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like this may be the same issue reported in an earlier post (https://sourceforge.net/projects/openccg/forums/forum/255819/topic/3727899); can you see if this fixes the issue? If so, we should update the code in the github repo.
Hi,
The problem is in the lex.py package. You have to change the following
comparision.
if not isinstance(s,types.StringType):
raise ValueError, "Expected a string"
==>
if not isinstance(s,types.StringTypes):
raise ValueError, "Expected a string"
Note that types.StringType ==> types.StringType[b]s[/b]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using VisCCG, I just can edit a ccg file, nothing else.
Every other action (e.g. validate, visualize Lexicon, Words or Rules) causes an exception, e.g. validating:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files (x86)\Python27\lib\lib-tk\Tkinter.py", line 1536, in
call
return self.func(*args)
File "D:\Projekte\PAL\openccg/bin/ccg_editor.py", line 151, in <lambda>
vldButton = Button (btnFrame, text='Validate', command = lambda: self.onVali
date(editFrame, cfile))
File "D:\Projekte\PAL\openccg/bin/ccg_editor.py", line 241, in onValidate
cfile.compile_if_needed()
File "D:\Projekte\PAL\openccg/bin/ccg_editor.py", line 1317, in compile_if_nee
ded
self.curparse = ccg2xml.parse_string(text)
File "D:\Projekte\PAL\openccg\bin\ccg2xml.py", line 3333, in parse_string
retval.parse = yacc.parse(str, lexer=MacroLexer(globallexer))
File "D:\Projekte\PAL\openccg\bin\yacc.py", line 181, in parse
lexer.input(input)
File "D:\Projekte\PAL\openccg\bin\ccg2xml.py", line 3173, in input
self.lexer.input(s)
File "D:\Projekte\PAL\openccg\bin\lex.py", line 255, in input
raise ValueError, "Expected a string"
ValueError: Expected a string
Onboard: Python 2.7 and JDK 1.7.0_79 (32bit).
Can you give me a hint? Thanks!
It looks like this may be the same issue reported in an earlier post (https://sourceforge.net/projects/openccg/forums/forum/255819/topic/3727899); can you see if this fixes the issue? If so, we should update the code in the github repo.
Hi,
The problem is in the lex.py package. You have to change the following
comparision.
if not isinstance(s,types.StringType):
raise ValueError, "Expected a string"
==>
if not isinstance(s,types.StringTypes):
raise ValueError, "Expected a string"
Note that types.StringType ==> types.StringType[b]s[/b]
Thank you a lot! :-)