Skip to content

Error when sending large files #1

@LiXiang0723

Description

@LiXiang0723

I was trying to send a large file (about 302KB in base64 format using "sendb" command ) to the ws2s server.It gave me following error:

Exception happened during processing of request from ('127.0.0.1', 54231)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 599, in process_request_thread
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Library/Python/2.7/site-packages/ws2s/websocket_server.py", line 162, in __init__
    StreamRequestHandler.__init__(self, socket, addr, server)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "/Library/Python/2.7/site-packages/ws2s/websocket_server.py", line 175, in handle
    self.read_next_message()
  File "/Library/Python/2.7/site-packages/ws2s/websocket_server.py", line 235, in read_next_message
    opcode_handler(self, message_bytes.decode('utf8'))
  File "/Library/Python/2.7/site-packages/ws2s/websocket_server.py", line 121, in _message_received_
    self.message_received(self.handler_to_client(handler), self, msg)
  File "/Library/Python/2.7/site-packages/ws2s/ws2s_server.py", line 37, in message_received_wrapper
    if response_message:
UnboundLocalError: local variable 'response_message' referenced before assignment

Small files works fine. Any help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions