tarsqi / ttk

Tarsqi Toolkit
Apache License 2.0
25 stars 10 forks source link

Directory names cannot have spaces in them #42

Closed marcverhagen closed 6 years ago

marcverhagen commented 7 years ago

When TTK lives in a path which has a space in it then it chokes:

[12:42:23] code (develop)> python tarsqi.py data/in/simple-xml/test.xml x.xml
    reading parameters ...
    tagging ...
sh: /Users/marc/Documents/git/ttk: Is a directory
sh: /Users/marc/Documents/git/ttk: Is a directory
ERROR: CLASSIFIER error:
    <type 'exceptions.IOError'>
    [Errno 2] No such file or directory: '/Users/marc/Documents/git/ttk space/code/data/tmp/vectors.EE.out'

     finished.
[12:42:47] code (develop)> 
marcverhagen commented 7 years ago

This worked for Linux and Mac, but for Windows it actually broke things when your path does not have a space (and maybe did not even solve the space issue). The single quotes that I put around the file paths were considered part of the path by windows.

So must undo these changes and figure out how to properly deal with spaces in windows paths and for now stipulate that paths should not have spaces in them.

marcverhagen commented 7 years ago

Using the double quotes appears to have unbroken the code on Windows. But it did not fix the problem for paths with spaces. When you do that the classifier breaks. It will create empty output in data/tmp/vectors.EE.out and data/tmp/vectors.ET.out, and the accompanying error files have the following content:

Workspace\ttk\data\tmp\vectors.EE""=="" was unexpected at this time.

This was from a TTK version that was installed in a directory named Git Workspace.

marcverhagen commented 6 years ago

Closed because it is superseded by https://github.com/tarsqi/ttk/issues/82.