forked from geeknik/mmm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_config.py
More file actions
44 lines (36 loc) · 1.28 KB
/
debug_config.py
File metadata and controls
44 lines (36 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
"""
Debug the config issue in CLI
"""
import sys
sys.path.insert(0, '/home/geeknik/dev/mmm')
from mmm.config.config_manager import ConfigManager
def test_config():
print("Testing config manager...")
# Test global config creation
global_config = ConfigManager()
print(f"1. Global config created: {type(global_config)}")
print(f" Has config attribute: {hasattr(global_config, 'config')}")
print(f" Config type: {type(global_config.config)}")
# Test accessing config
try:
config_dict = global_config.config
print(f"2. Config dict accessed successfully: {type(config_dict)}")
print(f" Config keys: {list(config_dict.keys())[:5]}")
except Exception as e:
print(f"2. Error accessing config: {e}")
# Test creating AudioSanitizer with this config
try:
from mmm.core.audio_sanitizer import AudioSanitizer
from pathlib import Path
sanitizer = AudioSanitizer(
input_file=Path("Schizo Shaman.mp3"),
config=config_dict
)
print("3. AudioSanitizer created successfully")
except Exception as e:
print(f"3. Error creating AudioSanitizer: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
test_config()