strycore / fakegir

fakegir: Bring autocompletion to your PyGObject code
GNU General Public License v3.0
92 stars 16 forks source link

python 3 support broken #9

Closed ellisong closed 6 years ago

ellisong commented 10 years ago

Python 3.4 does not work with the current revision

With 'python3 fakegir.py', I get:

Traceback (most recent call last): File "fakegir.py", line 230, in generate_fakegir() File "fakegir.py", line 222, in generate_fakegir fakegir_content = parse_gir(gir_path) File "fakegir.py", line 191, in parse_gir namespace_content = extract_namespace(namespace) File "fakegir.py", line 168, in extract_namespace docstring) File "fakegir.py", line 73, in insert_function "\n").split("\n")]) TypeError: can't concat bytes to str

To resolve the issue, I placed a str() around docstring in line 70.

codywd commented 10 years ago

To continue with this, I get the following error right after using this fix (also happens when running python2 fakegir.py)

Traceback (most recent call last):
  File "fakegir.py", line 230, in <module>
    generate_fakegir()
  File "fakegir.py", line 222, in generate_fakegir
    fakegir_content = parse_gir(gir_path)
  File "fakegir.py", line 191, in parse_gir
    namespace_content = extract_namespace(namespace)
  File "fakegir.py", line 162, in extract_namespace
    namespace_content += insert_enum(element)
  File "fakegir.py", line 87, in insert_enum
    if enum_name[0].isdigit():
IndexError: string index out of range
roelandxyz commented 6 years ago

I tried python 3.6 and it works for me. This issue is 3 years old. Maybe just close it?

codywd commented 6 years ago

Thanks for the info @r03. It's been a while since I've used this.

strycore commented 6 years ago

Yeah, I've used fakegir recently and with Python 3, guess the issue is fixed.