Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Failing on valid WDL files #6

Open
anton-khodak opened this issue Jan 24, 2017 · 4 comments
Open

Failing on valid WDL files #6

anton-khodak opened this issue Jan 24, 2017 · 4 comments

Comments

@anton-khodak
Copy link

I use pywdl to parse descriptions from the main repository, for instance, this one and this . Both descriptions have valid syntax (wdltool showed no errors on checking). However, when I run pywdl on either of them, I get the following errors:

$ wdl parse "/media/anton/ECFA959BFA95631E/Programming/pywdl/wdl/test/cases/ValidateBamsWf_170107.wdl"
Traceback (most recent call last):
 File "/home/anton/programming/venvs/pywdl/bin/wdl", line 4, in <module>
   __import__('pkg_resources').run_script('wdl==1.0.22', 'wdl')
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 735, in run_script
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 1659, in run_script
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/wdl-1.0.22-py3.5.egg/EGG-INFO/scripts/wdl", line 6, in <module>
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/wdl-1.0.22-py3.5.egg/wdl/main.py", line 76, in cli
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/wdl-1.0.22-py3.5.egg/wdl/parser.py", line 1222, in parse
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/wdl-1.0.22-py3.5.egg/wdl/parser.py", line 4077, in lex
 File "/home/anton/programming/venvs/pywdl/lib/python3.5/site-packages/wdl-1.0.22-py3.5.egg/wdl/parser.py", line 4073, in lex
AttributeError: 'str' object has no attribute 'unrecognized_token'

if I do this programmatically:

>>> with open('/media/anton/ECFA959BFA95631E/Programming/pywdl/wdl/test/cases/ValidateBamsWf_170107.wdl') as f:
    wdl.load(f)    
    
Traceback (most recent call last):
  File "<input>", line 2, in <module>
  File "/media/anton/ECFA959BFA95631E/Programming/pywdl/wdl/__init__.py", line 6, in load
    return parse_namespace(fp.read(), resource if resource is not None else fp.name)
  File "/media/anton/ECFA959BFA95631E/Programming/pywdl/wdl/binding.py", line 284, in parse_namespace
    tokens = wdl.parser.lex(string, resource, errors)
  File "/media/anton/ECFA959BFA95631E/Programming/pywdl/wdl/parser.py", line 4077, in lex
    return TokenStream(HermesLexer().lex(source, resource, errors, debug))
  File "/media/anton/ECFA959BFA95631E/Programming/pywdl/wdl/parser.py", line 4073, in lex
    raise ctx.errors.unrecognized_token(string_copy, ctx.line, ctx.col)
wdl.parser.SyntaxError: Unrecognized token on line 77, column 10:
    Array[File] validation_reports = ValidateBAM.validation_report
         ^
@anton-khodak
Copy link
Author

anton-khodak commented Jan 25, 2017

UPD. I regenerated parser.py with hermes and tried again, with no success

@anton-khodak
Copy link
Author

anton-khodak commented Jan 25, 2017

Please, tell me, is anything expected to be tackled regarding this issue in the nearest time? It is blocking me. If not, I will need to write just the same parser, but without bugs.

@vdauwera
Copy link

This was a proof of concept implementation, but we no longer use it and the language specification has evolved, which is probably why it seems broken. You're welcome to fork it and/or write your own as we do not plan to do anything more with it as far as I'm aware.

@geoffjentry
Copy link
Contributor

@anton-khodak - @vdauwera is correct, our dev team is no longer actively maintaining this. We should make this more clear. That might change in the future, but for now if someone was interested in picking it up we think that'd be awesome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants