COLOR-SKY / DialogueExtractor

A tool that extracts video clips using subtitles
GNU General Public License v3.0
136 stars 21 forks source link

运行时无反应报错,删掉json文件后可以运行但操作时闪退 #5

Open annesede opened 2 years ago

annesede commented 2 years ago
  1. 运行DialogueExtractor.py时无反应并报错如下: Traceback (most recent call last): File "...\DialogueExtractor-master\DialogueExtractor-master\DialogueExtractor_ch\DialogueExtractor.py", line 145, in <module> File "...\DialogueExtractor-master\DialogueExtractor-master\DialogueExtractor_ch\DialogueExtractor.py", line 146, in Ui_MainWindow projectSetup = ProjectSetup() File "...\DialogueExtractor-master\DialogueExtractor-master\DialogueExtractor_ch\DialogueExtractor.py", line 60, in __init__ data = json.loads(s) File "...\.conda\envs\Dex\lib\json\__init__.py", line 348, in loads return _default_decoder.decode(s)" File "...\.conda\envs\Dex\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "...\.conda\envs\Dex\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
  2. 在删掉config.json文件后可以运行,但在选择导入/导出时闪退并报错如下: File "...\DialogueExtractor-master\DialogueExtractor-master\DialogueExtractor_ch\DialogueExtractor.py", line 635, in <lambda> lambda: self.getInputFolder(MainWindow)) File "...\DialogueExtractor-master\DialogueExtractor-master\DialogueExtractor_ch\DialogueExtractor.py", line 169, in getInputFolder with open("./config.json", "w", encoding="utf-8") as json_file: PermissionError: [Errno 13] Permission denied: './config.json'
annesede commented 2 years ago

抱歉刚看到前面的回复,是config.json文件中多了一个换行符,删掉后已解决。

annesede commented 2 years ago

以下是我在安装时遇到的问题及可行的解决办法

  1. miniconda3安装后需手动将"..\miniconda", "..\miniconda\Scripts" ..\miniconda\Library\bin"添加到系统环境变量PATH中,否则将报错:conda不是内部或外部命令,也不是可运行的程序
  2. ffmpeg安装后需手动将"\ffmpeg\bin"添加到系统环境变量PATH中,否则将报错:ffmpeg不是内部或外部命令,也不是可运行的程序
  3. 运行时若报错Permission denied: './config.json',请检查是否有json文件,请自行创建空白的config.json文件
  4. 运行时若报错JSONDecodeError,注意检查json文件是否包含无法识别字段(包括表情、换行符等),请删掉所有字符
  5. 预览视频时若报错Permission denied:'./temp',请找到miniconda文件和DE文件,并在属性-安全中赋予用户完全控制权限