-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Labels
Needs triageNeed to apply low priority/high priority etcNeed to apply low priority/high priority etcbugSomething isn't workingSomething isn't working
Description
scratchattach version
2.1.13
What happened?
The script fails when it tries to initialize cloud events, I have re-ran my script many times and nothing seems to be working.
Your code.
from huggingface_hub import InferenceClient
import scratchattach as sa
# Logins
client = InferenceClient(api_key="TOKEN")
session = sa.login("USERNAME", "PASSWORD")
# Connections
cloud = session.connect_cloud('ID')
events = cloud.events()
def generate(content: str):
output = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=[
{
"role": "user",
"content": content
}
]
)
return output.choices[0].message
@events.event
def on_set(activity):
print(activity.var)
events.start()Traceback
websocket._exceptions.WebSocketBadStatusException: Handshake status 502 Bad Gateway -+-+- {'date': 'Wed, 31 Dec 2025 05:39:48 GMT', 'content-type': 'text/html', 'content-length': '157', 'connection': 'keep-alive', 'server': 'nginx/1.22.1'} -+-+- b'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.22.1</center>\r\n</body>\r\n</html>\r\n'Metadata
Metadata
Assignees
Labels
Needs triageNeed to apply low priority/high priority etcNeed to apply low priority/high priority etcbugSomething isn't workingSomething isn't working