#2899 程序内部错误:'float' object cannot be interpreted as an integerTraceback (most recent call last): File "videotrans\task\job.p

113.95* Posted at: 1 day ago 👁32

程序内部错误:'float' object cannot be interpreted as an integer
Traceback (most recent call last):
File "videotrans\task\job.py", line 249, in run
File "videotrans\task\trans_create.py", line 714, in align
File "videotrans\task\_rate.py", line 277, in run
File "videotrans\task\_rate.py", line 579, in _execute_audio_speedup_rubberband
File "videotrans\process\signelobj.py", line 73, in submit_task_cpu
File "videotrans\process\signelobj.py", line 56, in get_executor_cpu
File "concurrent\futures\process.py", line 650, in init
File "concurrent\futures\process.py", line 165, in init
File "multiprocessing\queues.py", line 49, in init
File "multiprocessing\context.py", line 88, in BoundedSemaphore
File "multiprocessing\synchronize.py", line 145, in init
File "multiprocessing\synchronize.py", line 57, in init
TypeError: 'float' object cannot be interpreted as an integer
TaskCfg(cache_folder='G:/VideoTrans/tmp/11880/ac9049cf94', target_dir='D
......
here, under this Restriction Toggles 68 00:02:49,960 --> 00:02:52,890 you can enable all of these buttons, 69 00:02:52,890 --> 00:02:56,000 and then you have everything here what we need. 70 00:02:56,000 --> 00:02:58,710 So, in our case we only need the cursor, 71 00:02:58,710 --> 00:03:02,270 the eye, and the camera over here. 72 00:03:02,270 --> 00:03:05,251 So, these three buttons we will see in most of my videos. 73 00:03:05,251 --> 00:03:06,084 (vertical lines swishing) 74 00:03:06,084 --> 00:03:07,820 So, and the last thing I wanna show you here, 75 00:03:07,820 --> 00:03:10,794 is, if I click on Edit, Preferences, 76 00:03:10,794 --> 00:03:13,299 here we can change a bunch of settings. 77 00:03:13,299 --> 00:03:16,875 We will get to these preferences in a later video. 78 00:03:16,875 --> 00:03:19,001 The only thing I wanna show you here is, 79 00:03:19,001 --> 00:03:21,674 in earlier versions of Blender 2.8 Beta, 80 00:03:21,674 --> 00:03:24,220 and also in Blender 2.79, 81 00:03:24,220 --> 00:03:25,960 when we did some changes over here, 82 00:03:25,960 --> 00:03:29,022 we had to save the user preferences manually. 83 00:03:29,022 --> 00:03:30,960 But now in Blender 2.8, 84 00:03:30,960 --> 00:03:34,010 it will save everything you do automatically. 85 00:03:34,010 --> 00:03:36,720 That means if you uncheck something here, or check this, 86 00:03:36,720 --> 00:03:39,750 or change anything, this will be saved automatically, 87 00:03:39,750 --> 00:03:42,050 that means you don't need to do anything else. 88 00:03:42,050 --> 00:03:44,580 Also, after closing and reopening Blender 89 00:03:44,580 --> 00:03:45,809 this will be saved. 90 00:03:45,809 --> 00:03:48,887 If you don't like this autosave however 91 00:03:48,887 --> 00:03:50,850 then you can click down here 92 00:03:50,850 --> 00:03:53,023 and disable Auto-Save Preferences 93 00:03:53,023 --> 00:03:56,411 and then you can Save Current State manually. 94 00:03:56,411 --> 00:03:58,770 So, if you don't know what all this means, 95 00:03:58,770 --> 00:04:00,060 no problem at all, 96 00:04:00,060 --> 00:04:02,120 later on when you come to the point in the course 97 00:04:02,120 --> 00:04:03,906 you will probably remember, 98 00:04:03,906 --> 00:04:06,490 and in most videos where it is important 99 00:04:06,490 --> 00:04:08,480 I also added separate parts 100 00:04:08,480 --> 00:04:10,308 where I show you if something has changed. 101 00:04:10,308 --> 00:04:11,679 (logo whooshes) (circle blasts) 102 00:04:11,679 --> 00:04:14,233 (bright instrumental jingling)", novoice_mp4='G:/VideoTrans/tmp/11880/ac9049cf94/novoice.mp4', noextname='04_blender_user_interface_changes', shibie_audio=None, targetdir_mp4='D:/CGBoost – Blender 2.8 Launch Pad/CGBoost – Blender 2.8 Launch Pad.part1/CGBoost – Blender 2.8 Launch Pad/01_getting_started_videos/videos/out/04_blender_user_interface_changes-mp4/04_blender_user_interface_changes.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=1, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Aiden', copysrt_rawvideo=False, clear_cache=False, translate_type=0, tts_type=4, recogn_type=0, model_name='large-v3-turbo', voice_autorate=True, video_autorate=False, cuda=True, name='D:/CGBoost – Blender 2.8 Launch Pad/CGBoost – Blender 2.8 Launch Pad.part1/CGBoost – Blender 2.8 Launch Pad/01_getting_started_videos/videos/04_blender_user_interface_changes.mp4', basename='04_blender_user_interface_changes.mp4', ext='mp4', dirname='D:/CGBoost – Blender 2.8 Launch Pad/CGBoost – Blender 2.8 Launch Pad.part1/CGBoost – Blender 2.8 Launch Pad/01_getting_started_videos/videos', shound_del_name=None, uuid='ac9049cf94', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.19045-SP0
version:v3.95
frozen:True
language:zh
root_dir:G:/VideoTrans

5 Replies

这是由于软件在处理音频加速对齐时,内部参数传递错误导致的。具体是 multiprocessing 模块在创建进程池时,收到了一个浮点数(float)作为整数(integer)参数。

  1. 检查并修改视频/音频文件路径:从日志中看到,你的视频文件路径包含大量空格和特殊符号(CGBoost – Blender 2.8 Launch Pad)。这是导致许多未知错误的常见原因。请将视频文件移动到一个路径中不包含任何中文、空格或特殊符号的文件夹中(例如 D:\videos),然后重新处理。
  2. 检查“高级选项”中的“配音后处理”设置:此错误发生在音频加速对齐阶段(_execute_audio_speedup_rubberband)。请进入“高级选项”,检查“配音后处理”或“音频对齐”相关的参数(如“同时处理线程数”)是否被设置为了非整数值(如小数)。如果发现,请将其修改为整数(例如 1 或 2)。
  3. 如果问题依旧,请提供更详细的日志:如果完成以上两步后错误仍然出现,请提供软件根目录下 logs 文件夹中最新日志文件的完整内容,以便进一步分析。

参考文档:

有点bug,打开菜单--工具-高级选项--通用设置--最大进程数,填写为2,如果大于16核,可以填写为8

有点bug,打开菜单--工具-高级选项--通用设置--最大进程数,填写为2,如果大于16核,可以填写为8

保存后需要重启软件

OKL

这是由于软件 v3.95 版本在处理多进程时的一个已知 bug 导致的。

根据开发者的直接回复,请按以下步骤操作:

  1. 在软件主界面,点击顶部菜单栏的“工具”。
  2. 在下拉菜单中选择“高级选项”。
  3. 在弹出的窗口中,找到“通用设置”选项卡。
  4. 将“最大进程数”修改为 2(如果你的 CPU 核心数大于 16,则可以设置为 8)。
  5. 点击“保存”按钮。
  6. 重要:关闭并重新启动 pyVideoTrans 软件,修改才会生效。

完成以上设置后,再次尝试视频翻译任务,该错误应被解决。

参考文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource