Skip to content

[Bug]: sa.init_cloud_server(...) #628

@JloAu

Description

@JloAu

scratchattach version

3.0.0b4

What happened?

I noticed a weird change in this version compared to 2.1.19: thread is an unexpected argument in sa.init_cloud_server(...).
I used the same code as here.

Also, when the server is running, every time a cloud var is set by a client, I get this kind of message in the terminal:
{'method': 'handshake', 'user': 'player', 'project_id': '1321224718'}
{'method': 'set', 'user': 'player', 'project_id': '1321224718', 'name': '☁ CLOUD1', 'value': 6}
The log_var_set argument was set to False

These 2 issues were not in 2.1.19

Your code.

server = sa.init_cloud_server(
    server_ip, server_port, # set IP address and port
    thread=True, # if set to True, the server will run in a thread
    length_limit=None, allow_non_numeric=True, # customize what cloud values are allowed
    whitelisted_projects=None, allow_nonscratch_names=True, blocked_ips=[],
    sync_players=True, # when set to False, other players will no longer be notified about cloud updates (only the server will see and parse them)
    log_var_sets=False # when set to True, all var sets will be printed to the console (can be spammy)
)

server.start()

Traceback

Traceback (most recent call last):
  File "c:\Users\JloAu\Documents\Python\Scratchattach.py", line 11, in <module>
    server = sa.init_cloud_server(
        server_ip, server_port, # set IP address and port
    ...<4 lines>...
        log_var_sets=False # when set to True, all var sets will be printed to the console (can be spammy)
    )
TypeError: init_cloud_server() got an unexpected keyword argument 'thread'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs triageNeed to apply low priority/high priority etcbugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions