reloadware / reloadium

Hot Reloading and Profiling for Python
https://reloadium.io
Apache License 2.0
2.74k stars 56 forks source link

reloadium plugin in pycharm with twisted libary #191

Closed kgdngitfk closed 1 month ago

kgdngitfk commented 1 month ago

Describe the bug*

python script used twisted libary run with reloadium in pychram error:

\.venv\lib\site-packages\zope\interface\interface.py", line 789, in update_value
    raise InvalidInterface("Concrete attribute, " + aname)
zope.interface.exceptions.InvalidInterface: Concrete attribute, __classcell__

To Reproduce

contents in Echo.py as follows code:

from twisted.internet import protocol, reactor, endpoints
from Answer import *

class Echo(protocol.Protocol):
    def dataReceived(self, data):
        print("dataReceived!!!!")
        print(data)
        #self.transport.write(data)
    def connectionMade(self):
        print("connectionMade")
    def connectionLost(self, reason):
        print("connectionLost")

class EchoFactory(protocol.Factory):
    def buildProtocol(self, addr):
        return Echo()
if __name__=='__main__':
    endpoints.serverFromString(reactor, "tcp:1234").listen(EchoFactory())
    reactor.run()

click the button debug Echo with reloadium ; the error occured, while use command: reloadium run Echo.py everything is OK

Additional context

Add any other context about the problem here.

dkrystki commented 1 month ago

I can't reproduce it. Can you provide more information?

kgdngitfk commented 1 month ago

python 3.10.4 twisted 24.3.0 reloadium 1.4.1 OS win11

kgdngitfk commented 1 month ago

after pip uninstall and pipinstall ,all things is ok