Skip to content

multiprocTCPBase: Example keeps breaking on InvalidActorSpecification on my machine #69

@s-t-a-n

Description

@s-t-a-n

Hi!

I've been playing with multiProcTCPBase the entire evening for a project but I have the weirdest issue with it. It seems to be tracking state accross runs somehow.

I started out with the simpleSystemBase and for timing reasons started using multiProcTCPBase. I got weird stacktraces for running simple actors running some basic wakeupAfter logic. I gave up early as it seemed I was somehow completely borking this.

After a cup of coffee I picked up the example hellogoodbye.py from this repo and every works.

I refactor code back to goal state. Sort of works. I keep cycling through normal write and build cycles. Then poof, same issue as before.

Tracking back to the example I found that it now is no longer working as well, even cross reboot.

Killing Python processes should do away with all states, no? I nuke 'em with pkill -9 and check that there are not Python processes stuck.

*Trace from running the hellogoodbye.py.

Stacktrace

stan@host ~ % python3.9 thespian_multitcp.py multiprocTCPBase 
Traceback (most recent call last):
  File "/home/stan/thespian_multitcp.py", line 43, in <module>
    run_example(sys.argv[1] if len(sys.argv) > 1 else None)
  File "/home/stan/thespian_multitcp.py", line 34, in run_example
    hello = ActorSystem().createActor(Hello)
  File "/home/stan/.local/lib/python3.9/site-packages/thespian/actors.py", line 704, in createActor
    return self._systemBase.newPrimaryActor(actorClass,
  File "/home/stan/.local/lib/python3.9/site-packages/thespian/system/systemBase.py", line 195, in newPrimaryActor
    raise InvalidActorSpecification(actorClass,
thespian.actors.InvalidActorSpecification: Invalid Actor Specification: <class '__main__.Hello'> (module '__main__' has no attribute 'Hello')

It seems hello_callable = ActorSystem().createActor(HelloCallable) comes back with and InvalidActorSpecification for not finding the Hello attribute on __main__? Am I completely missing something here? Please tell me it's an 'aha' since otherwise this library is solid!

Details

OS: Ubuntu 20.04
Python: Python 3.9.12
Pip: 22.0.4
Package: thespian==3.10.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions