import importlib
import core.config

# Force reload the module
importlib.reload(core.config)

from core.config import Config

# Create a new config instance
config = Config()

print(f"Config instance created")
print(f"Raw server_port: {repr(config.get('server_port'))}")
print(f"Type: {type(config.get('server_port'))}")

# Test the get_int method step by step
try:
    value = config.config.get('settings', 'server_port', fallback=None)
    print(f"config.get result: {repr(value)}")
    print(f"Type: {type(value)}")
    
    if value is not None:
        int_result = int(value)
        print(f"int() conversion: {int_result}")
    else:
        print("Value is None, using fallback")
        
except Exception as e:
    print(f"Exception in get_int: {e}")

# Call the actual method
print(f"Calling get_int('server_port', fallback=8000)")
result = config.get_int('server_port', fallback=8000)
print(f"get_int result: {result}")