Skip to content

Required version of python and libraries? #41

Description

@andreaswatch

First of all I would like to thank you for your effort in porting peerjs to python, this is a very interesting library!

Running the code below gives me:
createDataChannel() got an unexpected keyword argument 'ordered' File "/home/pi/automations/OpenCv/lib/python3.7/site-packages/peerjs/negotiator.py", line 63, in startConnection dataConnection.label, ordered=reliable)

options = PeerOptions(
    host = HOST,
    port = PORT,
    path = PATH,
    secure = True
)

peer = Peer("myId", options)
@peer.on(PeerEventType.Open)
async def on_open(data):
    print("Open: " + data)

async def start():
    global peer
    await peer.start()
    remote = await peer.connect("remoteId")
    while True:#peer.open:
        await asyncio.sleep(3)

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(start())
    loop.run_forever()

However, removing the 'ordered' argument, gives me further exceptions, like:
'dict' object has no attribute 'constraints'
(from negotiator.py #209)

So I guess that the problem might be in my python version or the installed library versions...(?)
I installed these requirements in a new venv:
#requirements.txt av~=8.0.0 aiortc>=0.9 websockets>=8.1 aiohttp>=3.6 pyee>=6.0 websockets>=8.1 dataclasses_json>=0.3 coloredlogs>=10.0

python --version Python 3.7.3

Could you please help to come around the problems?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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