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
Répondre
Vous utilisez un package Python qui est pour Python 2.x et utilise l'ancienne syntaxe Exception
(de gevent.hub).
Vous devez mettre à niveau le module de violation vers une version compatible Python 3.x.
Si ce n'est pas possible, vous devez déployer votre application sur Python 2.x.
Ce script ne démarre pas sur python2.X –
S'il y a une erreur Python 2.x alors s'il vous plaît éditez votre question et ajoutez-la là, donc je n'ai pas besoin de deviner ce qui est dit sur votre moniteur :) –
L'évidence est de vérifier que tous les modules concernés sont des versions Python 3.5. S'il vous plaît formater la sortie correctement, comme vous l'avez collé, il est très difficile à lire. – cdarke