• Alexandra

    Alexandra - 2010-12-01


    I need to write a small grammar for German as part of a project in my university class. I found a sample German grammar in .ccg format  and would like to test it. I obviously need to generate .xml files first using ccg2xml script.

    When I try to run the script I get various error messages about the Python code:
    Syntax Error: invalid syntax in line 843 and
    IndentationError: expected an indeted block in line 848.

    I also get an error message, when I try to run visccg:
    TabError: inconsistent use of tabs and spaces in indentation in line 133.

    I'm not very familiar with Python, so may be the problem has to do with Python version or something like that. I first had Python 3.1 installed on my computer. After that I also installed Python 2.4, when I saw it was a requirement for OpenCCG.

    Does anyone have an idea how to fix the problem?

  • Michael White

    Michael White - 2010-12-02

    I'm not familiar enough with ccg2xml to give a confident answer to this question, so I was hoping one of the Texas folks might be able to chime in.

    But I do know enough python to know that it's sensitive to indentation levels, and the error message makes it look like something has gone wrong with the white space in the files.  What platform and OS are you running openccg on?  Could you have unpacked the archive in a way that introduced spacing problems?  If you could try it on a different computer with a different OS, that might help narrow down the problem (or sidestep it).  I don't believe anyone else has encountered this problem before.


  • Koloblicin

    Koloblicin - 2010-12-23

    I also got that error. And I know a fellow student did, too.

    In my case it sufficed to substitute the indentation done with spaces with indentation done with tabs. So that between the beginning of a line and the first commands, there are only tabs. In my case the level of indentation done with spaces was correct (if you can't deduce from the code), so that it really just is about replacing space bar spaces with tab stops. Note however, that the width of a tab is not a set value, but differs overs files and systems. Again in my case (and I suppose it is the same with others' in this context) one tab had the width of four spaces.
    Some of the better text editors can also do that for you.

    However I run into other python errors after fixing that.

  • Michael White

    Michael White - 2010-12-26


    Sorry to hear about these problems.  How did you unpack the openccg archive?  And onto what platform?  As none of the developers have seen these problems, I'm guessing it has something to do with the way the files have been extracted.  I suppose it's also possible that different tab widths are the issue, but I would've thought the problem would've shown up before if that were the case.


  • Anonymous

    Anonymous - 2011-02-08

    Hello Mike. Please excuse the over-long delay :/ "Busy" doesn't begin to describe my situation. ;)

    Now that you mention it, it could be, that I unpacked the files on my win7 installation and moved them to my Ubuntu (10.10) virtual machine (which could almost be called stupid… ), but I'm not sure anymore.
    But I know that said fellow student, who encountered the same errors, did only handle the files on his Ubuntu 10.10 distribution (also on a virtual machine) and unpacked them with the tar command.

    But we have settled with using our text editors of choice and since the dot syntax is so neat, it is no problem so far.

    Best regards,


Log in to post a comment.