abse4411 / projz_renpy_translation

RenPy翻译 rpy翻译 RenPy机翻工具 - A translator for RenPy, renpy translation, rpy translation, renpy translator
GNU General Public License v3.0
116 stars 12 forks source link

执行loadexcel命令过程中报错AttributeError: 'float' object has no attribute 'strip' #7

Closed julienslink closed 1 year ago

julienslink commented 1 year ago

详情: 大文本量的rpy合并后成功保存为excel文件,使用GPT云翻后用loadexcel导入时报错,之后我又尝试了导出excel后不做改动直接导入,也是一样的报错。

error: 'float' object has no attribute 'strip'
[2023-08-22 20:49:11][parse_console.py:333, tid17164][ERROR] - 'float' object has no attribute 'strip'
Traceback (most recent call last):
  File "C:\JulienSlink_Personal\Ind_Prog\github\projz_renpy-devp\parse_console.py", line 330, in main
    register_commands[cmd](*args[1:])
  File "C:\JulienSlink_Personal\Ind_Prog\github\projz_renpy-devp\parse_console.py", line 285, in loadexcel_cmd
    res = load_from_excel(excel_file, source_data)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\JulienSlink_Personal\Ind_Prog\github\projz_renpy-devp\store\file_store.py", line 124, in load_from_excel
    encrypted_tid, old_str, new_str = encrypted_tid.strip().upper(), old_str.strip(), new_str.strip()
                                                                     ^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'strip'

附件:使用的rpy文件
scripts.zip

abse4411 commented 1 year ago

感谢反馈,这是由于文本是整个数字导致类型错误,已经在最新提交中修复这个问题

julienslink commented 1 year ago

感谢反馈,这是由于文本是整个数字导致类型错误,已经在最新提交中修复这个问题

多谢大佬