indigocalifornia / mvgen

5 stars 4 forks source link

TypeError: expected str, bytes or os.PathLike object, not NoneType #7

Open CatchACode opened 3 years ago

CatchACode commented 3 years ago

Command used to run in CMD: python main.py -s vidz --force 1280 720 which returns following output:

[CONFIG: {"raw_directory": "project/raw", "segments_directory": "project/segments", "work_directory": "project/work", "ready_directory": "project/ready", "audio": "audio/test.wav", "duration": 4, "bpm": "auto", "delete_work_dir": 1, "offset": 0, "force": ["1280", "720"], "segment_duration": 2, "segment_start": 10, "segment_end": 10, "force_segment": false, "sources": ["vidz"]}
AUDIO: Copying audio/test.wav to project\work\22b0dce5-c969-11eb-ab29-3c9c0f899db4\test.wav
AUDIO: Processing project\work\22b0dce5-c969-11eb-ab29-3c9c0f899db4\test.wav
AUDIO: Detecting BPM
AUDIO: 89.0 BPM
Traceback (most recent call last):
  File "E:\mvgen-master\main.py", line 143, in <module>
    run(args)
  File "E:\mvgen-master\main.py", line 128, in run
    final_file = MVGen.run(config)
  File "E:\mvgen-master\mvgen\mvgen.py", line 452, in run
    gen.generate(**get_args(config, MVGen.generate))
  File "E:\mvgen-master\mvgen\mvgen.py", line 252, in generate
    src_directory = convert_path(src_directory)
  File "E:\mvgen-master\mvgen\mvgen.py", line 51, in convert_path
    path = Path(path)
  File "C:\Users\*\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 1071, in __new__
    self = cls._from_parts(args, init=False)
  File "C:\Users\*\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 696, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "C:\Users\*\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 680, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType](url)

This is my Config File:

raw_directory: project/raw
segments_directory: project/segments
work_directory: project/work
ready_directory: project/ready
audio: audio/test.wav
duration: 4
bpm: auto
delete_work_dir: true
offset: 0
force: null
segment_duration: 2
segment_start: 10
segment_end: 10
force_segment: false
indigocalifornia commented 3 years ago

Please rename raw_directory to src_directory in the Config

README is a bit outdated, sorry

33ILMX commented 2 years ago

Please rename raw_directory to src_directory in the Config

README is a bit outdated, sorry

I've tried both ways and it's still not working :/

Would love some help please

Traceback (most recent call last):
  File "main.py", line 154, in <module>
    run(args)
  File "main.py", line 142, in run
    config = validate_config(config)
  File "main.py", line 19, in validate_config
    assert len(force) == 2, '--force must have exactly two elements.'
TypeError: object of type 'NoneType' has no len()

Update: seems like builds up to mvgen-b0798b8d4233fb5f6fa6e566f104c78d542eee4d work. Around mvgen-78819f34b2268a8389544052c0de511d15172bdd is where it breaks when the config file format was changed.