Open rfspencer opened 6 years ago
Hi @rfspencer
I can not reproduce your issue. I need some more information, please include the full console output.
If possible, it would also help if you uploaded the script you are trying to convert. If you do, please do not paste the script code into the GitHub comment but instead add the file as an attachment. You can also email the file to me if you don't want to share it publicly. rosensteinniklas@gmail.com
Hey @NiklasRosenstein!
Thanks for getting back to me. I've attached the script I was trying to convert; it was just the default "Hello World" script, but I also get this error when converting others, as well.
I also attached a screen shot, if that helps at all.
And here's the console output:
Creating /Users/richspencer/Library/Preferences/MAXON/Cinema 4D R19_8DA1506D/plugins/hello-world.pyp
Traceback (most recent call last):
File "/Users/richspencer/Library/Preferences/MAXON/Cinema 4D R19_8DA1506D/plugins/c4d_prototype_converter-v1.2.0/c4d_prototype_converter/ui/ScriptConverter.py", line 284, in on_create
cnv.create()
File "/Users/richspencer/Library/Preferences/MAXON/Cinema 4D R19_8DA1506D/plugins/c4d_prototype_converter-v1.2.0/c4d_prototype_converter/ui/ScriptConverter.py", line 192, in create
code = refactor.indentation(code, self.indent)
File "/Users/richspencer/Library/Preferences/MAXON/Cinema 4D R19_8DA1506D/plugins/c4d_prototype_converter-v1.2.0/c4d_prototype_converter/refactor.py", line 371, in indentation
return str(refactor_string([fixer], code))
File "/Users/richspencer/Library/Preferences/MAXON/Cinema 4D R19_8DA1506D/plugins/c4d_prototype_converter-v1.2.0/c4d_prototype_converter/refactor.py", line 60, in refactor_string
return rt.refactor_string(code, filename)
File "/Applications/MAXON/Cinema 4D R19/resource/modules/python/Python.osx.framework/lib/python2.7/lib2to3/refactor.py", line 380, in refactor_string
name, err.__class__.__name__, err)
File "/Applications/MAXON/Cinema 4D R19/resource/modules/python/Python.osx.framework/lib/python2.7/lib2to3/refactor.py", line 377, in refactor_string
tree = self.driver.parse_string(data)
File "/Applications/MAXON/Cinema 4D R19/resource/modules/python/Python.osx.framework/lib/python2.7/lib2to3/pgen2/driver.py", line 106, in parse_string
return self.parse_tokens(tokens, debug)
File "/Applications/MAXON/Cinema 4D R19/resource/modules/python/Python.osx.framework/lib/python2.7/lib2to3/pgen2/driver.py", line 71, in parse_tokens
if p.addtoken(type, value, (prefix, start)):
File "/Applications/MAXON/Cinema 4D R19/resource/modules/python/Python.osx.framework/lib/python2.7/lib2to3/pgen2/parse.py", line 116, in addtoken
ilabel = self.classify(type, value, context)
File "/Applications/MAXON/Cinema 4D R19/resource/modules/python/Python.osx.framework/lib/python2.7/lib2to3/pgen2/parse.py", line 172, in classify
raise ParseError("bad token", type, value, context)
ParseError: bad token: type=56, value='\r', context=('', (4, 3))
Hi @rfspencer thanks for the all the info you provided.
I'm trying hard but I just can not reproduce the error. :-(
What is weird is that it says in the error message line 4 column 3. But line 4 in your Script is empty and thus has no column 3.
Could you please try it with all of these 3 scripts for me and see if the error persists for any or all of them?
Hi Niklas,
Same problem over here (with different numbers...). This is of course not my tag plugin, but no matter what I test, I always get the same error. (R19 mac os 10.12).
Hope there's a solution, tia, Jochem
Just to add to the above... I just tested your V1.2.0 on R20 & I get the same message - fyi
OK... one more addition. Just tested the script & prototype converter on Windows10 R19, without R20 installed and it worked fine :). Can it be and issue with both having R19 & 20 installed? Thx, Jochem
OSX 10.13.5 Cinema 4D Studio R19.053 (Build RB224935) C4D Prototype Converter v1.2.0
I get an error when running the script converter, following the tutorial content: