Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client unexpectedly disconnected: unsupported operand type(s) for //: 'str' and 'int' #43

Closed
jfx41 opened this issue Feb 4, 2015 · 14 comments

Comments

@jfx41
Copy link
Contributor

jfx41 commented Feb 4, 2015

I was using the previous version of hangupsbot with great success until I started getting the error message in the subject.

So, I upgraded to the latest version and I'm still getting the error. For the life of me I can't find where the hell it's coming from, but I'm assuming it's one of the included libraries (just a hunch). This is what the output from the new version looks like (as did the old one minus the new plugin messages, etc):

$ ./hangupsbot.py --debug --log /tmp/hangupsbot.log
HangupsBot: memory file will be used
main(): config.plugins is not defined, using ALL
plugin command: plugins.easteregg -> easteregg
plugin command: plugins.lookup -> lookup
plugin command: plugins.chance -> coinflip
plugin command: plugins.chance -> diceroll
plugin command: plugins.lottery -> perform_drawing
plugin command: plugins.lottery -> prepare
plugin introspection: plugins.mentions implements ['mention', 'pushbulletapi', 'dnd', 'setnickname']
plugin command: plugins.mentions -> dnd
plugin command: plugins.mentions -> mention
plugin command: plugins.mentions -> pushbulletapi
plugin command: plugins.mentions -> setnickname
plugin introspection: plugins.default implements ['users', 'user', 'hangouts', 'rename', 'leave', 'reload', 'quit', 'config', 'whoami', 'whereami', 'echo']
plugin command: plugins.default -> config
plugin command: plugins.default -> echo
plugin command: plugins.default -> hangouts
plugin command: plugins.default -> leave
plugin command: plugins.default -> quit
plugin command: plugins.default -> reload
plugin command: plugins.default -> rename
plugin command: plugins.default -> user
plugin command: plugins.default -> users
plugin command: plugins.default -> whereami
plugin command: plugins.default -> whoami
logger: chats stored in /tmp
_load_hooks(): ['hooks', 'chatlogger', 'writer', 'logger']
config.jsonrpc[0].certfile must be configured
config.jsonrpc[1].certfile must be configured
config.jsonrpc[2].certfile must be configured
Client unexpectedly disconnected:
unsupported operand type(s) for //: 'str' and 'int'
Waiting 5 seconds...
Trying to connect again (try 1 of 5)...
Client unexpectedly disconnected:
unsupported operand type(s) for //: 'str' and 'int'
Waiting 10 seconds...
Trying to connect again (try 2 of 5)...
Client unexpectedly disconnected:
unsupported operand type(s) for //: 'str' and 'int'
Waiting 15 seconds...
Trying to connect again (try 3 of 5)...
Client unexpectedly disconnected:
unsupported operand type(s) for //: 'str' and 'int'
Waiting 20 seconds...
Trying to connect again (try 4 of 5)...
Client unexpectedly disconnected:
unsupported operand type(s) for //: 'str' and 'int'
Waiting 25 seconds...
Trying to connect again (try 5 of 5)...
Maximum number of retries reached! Exiting...

Any idea what's happening? It was working great, then I restarted the bot and then this happened with both versions.

Thanks.

@nylonee
Copy link
Contributor

nylonee commented Feb 4, 2015

This is to do with the main hangups library. Google had changed some parameters a few days ago, causing any projects that used that library to unexpectedly quit.

The problem has since been fixed, you can track it here, I suggest you pull the latest hangups changes and update your hangups library.

@nylonee nylonee added bug and removed bug labels Feb 4, 2015
@endofline
Copy link
Member

Just as a basic guide as well for those first pulling and making from source on linux:

  • git clone the hangups repo e.g. git clone https://...
  • cd the directory where the cloned files are - setup.py should be in this directory
  • python3 setup.py install - you may have to run this again if you are getting errors the first time

This will overwrite any pip3-installed hangups library with the latest build from source

@endofline
Copy link
Member

will leave this open for future reference, current fix at time of posting is: tdryer/hangups#64

@endofline
Copy link
Member

change in schema again, fix is tdryer/hangups#65

@endofline
Copy link
Member

closing this issue, please re-open if it occurs again

@ghost
Copy link

ghost commented Jan 5, 2017

not working for me I get this when I run setup.py

Traceback (most recent call last):
File "setup.py", line 1, in
from setuptools import setup
ImportError: No module named 'setuptools'

@JosephBlock
Copy link
Contributor

This has been closed for a year. What version of the bot and hangups?

@thannemann
Copy link
Contributor

what setup.py are you running? I don't think there is a setup.py as part of this project

@ghost
Copy link

ghost commented Jan 5, 2017

the hangups setup.py

the vertion i cant tell but im running python3.4.2 on my rpi (raspberry pi) with debain on

@thannemann
Copy link
Contributor

if you are installing the hangoutsbot from this GIT you need to use the hangups version that installs with the requirements.txt you should not have to run the setup.py in the hangups manually. follow the instructions here https://github.com/hangoutsbot/hangoutsbot/blob/master/INSTALL.md

@ghost
Copy link

ghost commented Jan 5, 2017

ok thanks

@ghost
Copy link

ghost commented Jan 5, 2017

now im getting this error:

pi@raspberrypi:~/Python-3.4.2/hangoutsbot $ python3 hangupsbot/hangupsbot.py
Traceback (most recent call last):
File "hangupsbot/hangupsbot.py", line 6, in
from hangups.schemas import OffTheRecordStatus
ImportError: No module named 'hangups.schemas'

@ghost
Copy link

ghost commented Jan 5, 2017

ps ignore the top line that's the comand, i have already installed hangups via that commandi just need to run it

@nylonee
Copy link
Contributor

nylonee commented Jan 6, 2017

@st3vi3 I'm not sure what version of hangups you're using, but this has already been fixed almost a year ago (see here).

This is not the right issue to be requesting help installing hangups, I would suggest using the search function to see if your question hasn't already been answered in the past, and if you're still having issues THEN start a new post.

@hangoutsbot hangoutsbot locked and limited conversation to collaborators Jan 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants