pygobject / pgi-docgen

API Documentation Generator for PyGObject
https://lazka.github.io/pgi-docs/
GNU Lesser General Public License v2.1
128 stars 36 forks source link

Error parsing Atk-1.0 #53

Closed TingPing closed 10 years ago

TingPing commented 10 years ago

Using git rev: 29a55c3fa18da56165ba67fb737eebafd56b9761 Atk version: 2.11.90 on Fedora 21

Parsing GIR (Atk-1.0)
Traceback (most recent call last):
  File "./pgi-docgen.py", line 75, in <module>
    main(sys.argv)
  File "./pgi-docgen.py", line 71, in main
    gen.write()
  File "/home/tingping/Projects/pgi-docgen/pgidocgen/main.py", line 52, in write
    gen.write()
  File "/home/tingping/Projects/pgi-docgen/pgidocgen/api.py", line 48, in write
    gen.write()
  File "/home/tingping/Projects/pgi-docgen/pgidocgen/module.py", line 118, in write
    sigs = repo.parse_signals(obj)
  File "/home/tingping/Projects/pgi-docgen/pgidocgen/repo.py", line 300, in parse_signals
    fsig = FuncSignature.from_string(attr, sig.__doc__)
  File "/home/tingping/Projects/pgi-docgen/pgidocgen/funcsig.py", line 91, in from_string
    match = re.match("(.*?)\((.*?)\)\s*(raises|)\s*(-> )?(.*)", line)
  File "/usr/lib64/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer
lazka commented 10 years ago

I can't reproduce with atk trunk. Do you have pgi trunk as well? It's needed atm

TingPing commented 10 years ago

Ah that was indeed the issue!

lazka commented 10 years ago

Thanks. I've added https://github.com/lazka/pgi-docgen/commit/65c535f4bc9ea24cbb73485c121610b2a2d4bb2c to give a better error in this case.