GithubHelp home page GithubHelp logo

beam-client-python's People

Contributors

2cubed avatar connor4312 avatar probableprime avatar

Stargazers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beam-client-python's Issues

UnknownError: <Response [200]>

Traceback (most recent call last):
File "example.py", line 16, in
chat.authenticate(config.CHANNEL)
File "/beam-client-python/chatty/connection.py", line 80, in authenticate
self._log_into_beam()
File "/beam-client-python/chatty/connection.py", line 54, in _log_into_beam
raise UnknownError(login_response)
chatty.errors.UnknownError: <Response [200]>

Example fails on Ubuntu 15.04

I was going to attempt to create my own Beam bot, just as a side project for my own amusement.

So, I git clone-d the repository and then run python3 setup.py build && sudo python3 setup.py install. That all went off without a hitch.

However, when I went to run the example code (after updating my config.py) I got this:

$ python3 example.py 
Connecting to wss://chat2-dal07.beam.pro:443/ws
ERROR:tornado.general:Uncaught exception, closing connection.
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/iostream.py", line 504, in _handle_events
    self._handle_connect()
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/iostream.py", line 1359, in _handle_connect
    do_handshake_on_connect=False)
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/netutil.py", line 510, in ssl_wrap_socket
    return context.wrap_socket(socket, **kwargs)
  File "/usr/lib/python3.4/ssl.py", line 365, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 542, in __init__
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
ERROR:tornado.application:Exception in callback None
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/ioloop.py", line 866, in start
    handler_func(fd_obj, events)
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/iostream.py", line 504, in _handle_events
    self._handle_connect()
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/iostream.py", line 1359, in _handle_connect
    do_handshake_on_connect=False)
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/netutil.py", line 510, in ssl_wrap_socket
    return context.wrap_socket(socket, **kwargs)
  File "/usr/lib/python3.4/ssl.py", line 365, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 542, in __init__
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
Socket closed [Code 1005] Connection refused
Reestablishing the socket in 1 second.
^CTraceback (most recent call last):
  File "example.py", line 30, in <module>
    ioloop.IOLoop.instance().start()
  File "/usr/local/lib/python3.4/dist-packages/tornado-4.2-py3.4-linux-i686.egg/tornado/ioloop.py", line 841, in start
    event_pairs = self._impl.poll(poll_timeout)
KeyboardInterrupt

What's causing this? I'm on Ubuntu MATE 15.04, running Python 3.4.3. All of the required packages are fully up to date.

Chatty json decoding issue

There I was, running the example.py and nothing worked :D


PS C:\Users\DayDreamer-i7\Desktop\beam-client-python-master> C:\Python34\python.exe .\example.py`

Traceback (most recent call last):
File ".\example.py", line 20, in
chat.authenticate()
File "C:\Users\DayDreamer-i7\Desktop\beam-client-python-master\chatty\connection.py", line 54, in authenticate
self._get_chat_details()
File "C:\Users\DayDreamer-i7\Desktop\beam-client-python-master\chatty\connection.py", line 33, in _get_chat_details
self.userid = requests.get(url=url, headers=header).json()['id']

KeyError: 'id'


Example hit several Exceptions when whispering bot account

ERROR:tornado.application:Uncaught exception, closing connection.
Traceback (most recent call last):
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 412, in _run_callback
    callback(*args, **kwargs)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 995, in on_message
    self._on_message_callback(message)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\socket.py", line 45, in parse_packet
    self.emit("message", packet)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\evented.py", line 15, in emit
    handler[1](*args)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\connection.py", line 55, in <lambda>
    self.websocket.on("message", lambda msg: self.emit("message", msg))
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\evented.py", line 15, in emit
    handler[1](*args)
  File "example.py", line 11, in _handle_chat
    chatevents.formatting(data)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\ChatEventHandler.py", line 21, in formatting
    func(data)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\ChatEventHandler.py", line 78, in type_event
    msg=msg))
  File "C:\Users\dtoth\Anaconda3\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 11: character maps to <undefined>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\iostream.py", line 554, in wrapper
    return callback(*args)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\stack_context.py", line 343, in wrapped
    raise_exc_info(exc)
  File "<string>", line 3, in raise_exc_info
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 804, in _on_frame_data
    self._handle_message(opcode, data)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 824, in _handle_message
    self._run_callback(self.handler.on_message, decoded)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 415, in _run_callback
    self.request.path, exc_info=True)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\httpclient.py", line 634, in __getattr__
    request_attr = getattr(self.request, name)
AttributeError: 'HTTPRequest' object has no attribute 'path'
ERROR:tornado.application:Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x000001ECFD2A9E18>)
Traceback (most recent call last):
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 412, in _run_callback
    callback(*args, **kwargs)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 995, in on_message
    self._on_message_callback(message)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\socket.py", line 45, in parse_packet
    self.emit("message", packet)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\evented.py", line 15, in emit
    handler[1](*args)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\connection.py", line 55, in <lambda>
    self.websocket.on("message", lambda msg: self.emit("message", msg))
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\chatty\evented.py", line 15, in emit
    handler[1](*args)
  File "example.py", line 11, in _handle_chat
    chatevents.formatting(data)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\ChatEventHandler.py", line 21, in formatting
    func(data)
  File "C:\Users\dtoth\Dropbox\beambot\python\beam-client-python\ChatEventHandler.py", line 78, in type_event
    msg=msg))
  File "C:\Users\dtoth\Anaconda3\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 11: character maps to <undefined>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\ioloop.py", line 604, in _run_callback
    ret = callback()
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\iostream.py", line 554, in wrapper
    return callback(*args)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\stack_context.py", line 343, in wrapped
    raise_exc_info(exc)
  File "<string>", line 3, in raise_exc_info
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 804, in _on_frame_data
    self._handle_message(opcode, data)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 824, in _handle_message
    self._run_callback(self.handler.on_message, decoded)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\websocket.py", line 415, in _run_callback
    self.request.path, exc_info=True)
  File "C:\Users\dtoth\Anaconda3\lib\site-packages\tornado\httpclient.py", line 634, in __getattr__
    request_attr = getattr(self.request, name)
AttributeError: 'HTTPRequest' object has no attribute 'path'

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.