-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typeerror i donnot know why #1
Comments
This script was tested only with Python 3.4+ - can't comment on Python 2.x
and see if that helps. Though ideally you would run it with Python3. |
I re-install py3 and this time had a new situation , seem not work again: Using c:\python3\lib\site-packages C:\Users\Libsu\Desktop\python-ass-master>cd C:\Users\Libsu\Desktop\sub2xml-master C:\Users\Libsu\Desktop\sub2xml-master>sub2xml.py 2333.ass |
Hmm can you provide the ass-file? I don't see anything obvious that would cause this error. |
1.zip |
When I run it via I get:
However with: it works:
This is because of I guess I should update the script to properly use argparse or something like it. Can you try with the command above and see if it helps? |
It successfully created, but I found another problem that the PRTL template is encoded in the utf-16, but the encoding for the ass subtitle is utf-8, I try to change either of them, and the program do not work(UnicodeDecodeError), when I generating Chinese characters (simplified Chinese), it's going to fail, part of word show "□□". But it does worked perfect in English. |
The PRTL has to be UTF-16LE encoded, this is a requirement by Adobe Premiere. I checked the .ass file and there are only Chinese characters in the defined styles, but there are none within the actual subs. All subs are using the default style. As stated in the README, this script ignores any styling, it just dumps the text from the subtitle into the PRTL files. If you have a sample .ass file with Chinese characters I can try it here. |
Since there is no further issue I will close this. |
C:\Users\Libsu\Desktop\sub2xml-master>sub2xml.py 1.ass Traceback (most recent call last): File "C:\Users\Libsu\Desktop\sub2xml-master\sub2xml.py", line 275, in <module> main() File "C:\Users\Libsu\Desktop\sub2xml-master\sub2xml.py", line 91, in main subs, sub_styles = sub_load(input_sub) File "C:\Users\Libsu\Desktop\sub2xml-master\sub2xml.py", line 184, in sub_load with open(inp_fname, "r", encoding='utf-8') as f: TypeError: 'encoding' is an invalid keyword argument for this function
win10 py2.7
The text was updated successfully, but these errors were encountered: