mnamer icon indicating copy to clipboard operation
mnamer copied to clipboard

Crash on Illegal Filenames

Open fabicodes opened this issue 6 years ago • 0 comments

Movie contains a colon in its title. Windows/NTFS doesn't allow this in File/Directorynames. Lets call this Movie "Somename: Subtitle" which was released 1970. The Colon gets wiped out in the Filename, but not in the Directoryname which crashes mnamer

============================== CRASH REPORT BEGIN ==============================

--------------------------------- environment ----------------------------------

 - date = 2020-07-11
 - platform = Windows-10-10.0.19041-SP0
 - arguments = ['--movie-directory', 'out\\{name} ({year})', '--movie-format', '{name} ({year}){extension}', '.\\in\\']
 - python version = 3.8.3
 - mnamer version = 2.4.1
 - requests cache = C:\Users\fabian\AppData\Local\mnamer-py3.8.sql

--------------------------------- stack trace ----------------------------------

Traceback (most recent call last):
  File "C:\Users\fabian\AppData\Roaming\Python\Python38\site-packages\mnamer\__main__.py", line 23, in main
    frontend.launch()
  File "C:\Users\fabian\AppData\Roaming\Python\Python38\site-packages\mnamer\frontends.py", line 80, in launch
    self._process_targets()
  File "C:\Users\fabian\AppData\Roaming\Python\Python38\site-packages\mnamer\frontends.py", line 137, in _process_targets
    if target.destination == target.source:
  File "C:\Users\fabian\AppData\Roaming\Python\Python38\site-packages\mnamer\target.py", line 112, in destination
    return Path(directory, filename).resolve()
  File "c:\python38\lib\pathlib.py", line 1177, in resolve
    s = self._flavour.resolve(self, strict=strict)
  File "c:\python38\lib\pathlib.py", line 205, in resolve
    s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'Y:\\out\\Somename: Subtitle (1970)\\Somename Subtitle (1970).mkv'

=============================== CRASH REPORT END ===============================

Dang, it looks like mnamer crashed! Please consider filling an issue at
https://github.com/jkwill87/mnamer/issues along with this report.

fabicodes avatar Jul 11 '20 07:07 fabicodes