Skip to content

websocket-client version 1.8.0 Compatibility Issue in llm_test.py  #50

@Awyoeng

Description

@Awyoeng

Hello,

I have encountered an issue when running llm_test.py using poetry as environment manager with websocket-client version 1.8.0.

The error message is as follows:

Exception in thread Thread-1 (run):
Traceback (most recent call last):
File "C:\Users\yiouyang5\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\yiouyang5\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "D:\Projct\spark-ai-python-main\sparkai\llm\llm.py", line 526, in run
self.client.enableTrace(False)
AttributeError: module 'websocket' has no attribute 'enableTrace'

As the error suggests, it seems the module 'websocket' has no attribute 'enableTrace'. I found that the websocket-client version specified in the pyproject.toml file of the project is ^1.7.0, which is supposed to accept all versions that are upward compatible with version 1.7.0.

However, the code does not run successfully with version 1.8.0, but when I downgrade the websocket-client to strictly version 1.7.0, the error does not occur and the script runs successfully.

Is there a possible compatibility issue with websocket-client version 1.8.0? And should the version be fixed to 1.7.0 in the project's pyproject.toml file to prevent potential issues?

Thank you in advance for your assistance.

Best regards,

Awyoeng

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