You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing functions from a file an exception is sometimes produced by the handle_write_package function without any clear pattern. They all produce the error message:
Traceback (most recent call last):
File "protocol/ujsonrpc.py", line 1, in _handle_message
File "commands/program_methods.py", line 1, in handle_write_package
Exception:
If you need more information from me, don't hesitate to ask.
My main file:
# LEGO type:advanced slot:0 autostart
from spike import PrimeHub
from spike.control import wait_for_seconds
from runtime.virtualmachine import VirtualMachine # Needed for newer hub versions (3.1.43+)
from test12 import *
async def on_start(vm, stack):
hub = PrimeHub()
print("Startup")
vm.stop()
def setup(rpc, system, stop):
vm = VirtualMachine(rpc, system, stop, "something_unique")
vm.register_on_start("another_unique_string", on_start)
return vm
Examples of files that could not be imported:
Example 1:
def test():
return
def test2():
return
Example 2:
def test():
#test
return
Example 3:
#test
def test():
return
Examples of files that can be uploaded to the spike prime:
Example 1:
def test():
return
Example 2:
#test
def test():
return
The text was updated successfully, but these errors were encountered:
yannerous
changed the title
Random Exceptions when importing functions
Exceptions when importing functions
Nov 23, 2024
When importing functions from a file an exception is sometimes produced by the handle_write_package function without any clear pattern. They all produce the error message:
If you need more information from me, don't hesitate to ask.
My main file:
Examples of files that could not be imported:
Example 1:
Example 2:
Example 3:
Examples of files that can be uploaded to the spike prime:
Example 1:
Example 2:
The text was updated successfully, but these errors were encountered: