folder stricture reorganize
This commit is contained in:
44
debug/debug_simple_callback.py
Normal file
44
debug/debug_simple_callback.py
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Debug simple callback to see exact error
|
||||
"""
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
def debug_simple_callback():
|
||||
"""Debug the simple callback"""
|
||||
try:
|
||||
callback_data = {
|
||||
"output": "test-output.children",
|
||||
"inputs": [
|
||||
{
|
||||
"id": "test-interval",
|
||||
"property": "n_intervals",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
print("Testing simple dashboard callback...")
|
||||
response = requests.post(
|
||||
'http://127.0.0.1:8052/_dash-update-component',
|
||||
json=callback_data,
|
||||
timeout=15,
|
||||
headers={'Content-Type': 'application/json'}
|
||||
)
|
||||
|
||||
print(f"Status Code: {response.status_code}")
|
||||
|
||||
if response.status_code == 500:
|
||||
print("Error response:")
|
||||
print(response.text)
|
||||
else:
|
||||
print("Success response:")
|
||||
print(response.text[:500])
|
||||
|
||||
except Exception as e:
|
||||
print(f"Request failed: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
debug_simple_callback()
|
Reference in New Issue
Block a user