-3
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from bot import bot
  File "/root/musicbot/bot.py", line 7, in <module>
    from database import db, text_search
  File "/root/musicbot/database.py", line 2, in <module>
    import pymongo
  File "/usr/local/lib/python3.5/site-packages/pymongo/__init__.py", line 92, in <module>
    from pymongo.connection import Connection
  File "/usr/local/lib/python3.5/site-packages/pymongo/connection.py", line 39, in <module>
    from pymongo.mongo_client import MongoClient
  File "/usr/local/lib/python3.5/site-packages/pymongo/mongo_client.py", line 46, in <module>
    from pymongo import (auth,
  File "/usr/local/lib/python3.5/site-packages/pymongo/pool.py", line 22, in <module>
    from pymongo import thread_util
  File "/usr/local/lib/python3.5/site-packages/pymongo/thread_util.py", line 31, in <module>
    from gevent.lock import BoundedSemaphore as GeventBoundedSemaphore
  File "/usr/local/lib/python3.5/site-packages/gevent/__init__.py", line 36, in <module>
    from gevent.hub import get_hub, iwait, wait
  File "/usr/local/lib/python3.5/site-packages/gevent/hub.py", line 282
    except Exception, ex:
                    ^
SyntaxError: invalid syntax
2
  • The obvious is to check all modules involved are Python 3.5 versions. Please format the output correctly, as you have pasted it is very difficult to read. Commented Jan 31, 2016 at 19:45
  • Possible duplicate of Gevent support in Python3 Commented Oct 12, 2019 at 16:46

1 Answer 1

0

You are using a Python package which is for Python 2.x and uses old Exception syntax (gevent.hub).

You need to upgrade the violating module to Python 3.x compatible version.

If this is not possible then you need to deploy your application on Python 2.x.

Sign up to request clarification or add additional context in comments.

2 Comments

This script doesn't start on python2.X
If there is a Python 2.x error then please edit your question and add it there, so I don't need to guess what is says on your monitor :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.