GithubHelp home page GithubHelp logo

hackchat's People

Contributors

arkamar avatar gkbrk avatar runapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hackchat's Issues

Incorrect dependency management

websocket-client should be placed in setup.py and not requirements.txt for pip packages as otherwise the dependency isn't automatically installed. I only knew how to make the library work because I found it via the code, but you should probably fix it for others.

TypeError: cafile, capath and cadata cannot be all omitted

I get this error when I trying to create a chat instance

Traceback (most recent call last):I get this error when I try to use websocket.create_connection:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/hackchat.py", line 17, in __init__
    self.ws = websocket.create_connection("wss://hack.chat/chat-ws")
  File "/usr/lib/python3.5/site-packages/websocket/_core.py", line 104, in create_connection
    websock.connect(url, **options)
  File "/usr/lib/python3.5/site-packages/websocket/_core.py", line 266, in connect
    self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options))
  File "/usr/lib/python3.5/site-packages/websocket/_http.py", line 69, in connect
    sock = _ssl_socket(sock, options.sslopt, hostname)
  File "/usr/lib/python3.5/site-packages/websocket/_http.py", line 163, in _ssl_socket
    sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
  File "/usr/lib/python3.5/site-packages/websocket/_http.py", line 128, in _wrap_sni_socket
    context.load_verify_locations(cafile=sslopt.get('ca_certs', None))
TypeError: cafile, capath and cadata cannot be all omitted

It works on my debian machine using python 3.4, but not my arch machine using the most recent python 3.5

sending packet function bug

I get
hackchat.py", line 18, in __init__ self.send_packet({"cmd": "join", "channel": channel, "nick": nick}) TypeError: send_packet() takes 1 positional argument but 2 were given
when using the library, both from my own bot as well as from running your example directly.

Connection is already closed error when bot has been running for a while

Here is the exact error:

File "/home/t3zla/hackchat/hackbot.py", line 118, in
chat.run_loop()
File "/usr/local/lib/python3.4/dist-packages/hackchat.py", line 38, in run_loop
self.run()
File "/usr/local/lib/python3.4/dist-packages/hackchat.py", line 19, in run
result = json.loads(self.ws.recv())
File "/usr/local/lib/python3.4/dist-packages/websocket/_core.py", line 348, in recv
opcode, data = self.recv_data()
File "/usr/local/lib/python3.4/dist-packages/websocket/_core.py", line 365, in recv_data
opcode, frame = self.recv_data_frame(control_frame)
File "/usr/local/lib/python3.4/dist-packages/websocket/_core.py", line 378, in recv_data_frame
frame = self.recv_frame()
File "/usr/local/lib/python3.4/dist-packages/websocket/_core.py", line 410, in recv_frame
return self.frame_buffer.recv_frame()
File "/usr/local/lib/python3.4/dist-packages/websocket/_abnf.py", line 312, in recv_frame
self.recv_header()
File "/usr/local/lib/python3.4/dist-packages/websocket/_abnf.py", line 261, in recv_header
header = self.recv_strict(2)
File "/usr/local/lib/python3.4/dist-packages/websocket/_abnf.py", line 346, in recv_strict
bytes = self.recv(min(16384, shortage))
File "/usr/local/lib/python3.4/dist-packages/websocket/_core.py", line 479, in _recv
return recv(self.sock, bufsize)
File "/usr/local/lib/python3.4/dist-packages/websocket/_socket.py", line 89, in recv
raise WebSocketConnectionClosedException("Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.