cubicibo / SUPer

HDMV PGS (BD SUP) subtitle encoder compatible with typesetting effects.
GNU General Public License v3.0
21 stars 4 forks source link

A Bug when writing file #24

Closed Alllen closed 8 months ago

Alllen commented 8 months ago
 SUPer: INFO : => Output PGS seems compliant.
 SUPer: INFO : Writing output file \\1921680223\moviesub\2024\2eng.pes
Traceback (most recent call last):
  File "D:\pythonProject\SUPer\SUPer-main\supercli.py", line 187, in <module>
    bdnr.write_output()
  File "D:\pythonProject\SUPer\SUPer-main\SUPer\interface.py", line 366, in write_output
    next(writer) #init writer
    ^^^^^^^^^^^^
  File "D:\pythonProject\ScenariStream\ScenariStream-main\scenaristream\__init__.py", line 394, in segment_writer
    esf = open(es_file, 'wb')
          ^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '\\\\1921680223\\moviesub\\2024\\2eng.pes'

When making a SUP file to a path in the Network Neighborhood, I got this. It seems like that the output file path was changed by program and all the "." in the ip address is automatically removed. It should be "192.168.0.223".The input path is the same path but there is no problem , I think, because the processing is almost finished.

cubicibo commented 8 months ago

Hi, You've got so many unusual use-cases!

The issue is in interface.py::353-354

fp_pes = ''.join(filepath[:-1]) + '.pes'
fp_sup = ''.join(filepath[:-1]) + '.sup'

it should be '.'.join for both. Fixed in 3fba5ca77accc1571fc56fd4bef4988a1875ff88. However, there is no plan to release a new EXE so soon, sorry.