Replies: 1 comment
-
Please don't file issues with this project when you are asking for help fixing a problem in your application. The issues board is to report bugs. When you don't have a bug to report, or cannot provide the information requested in the bug report form, then please write your question on the discussions board instead. Your problem is an incompatibility between eventlet and pymongo, it has nothing to do with Flask-SocketIO. I suggest you try removing eventlet from your project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My requirements.txt file is as follows:
attrs==19.3.0
Automat==0.8.0
bidict==0.22.1
blinker==1.4
bson==0.5.10
certifi==2019.11.28
chardet==3.0.4
click==8.1.3
cloud-init==22.2
colorama==0.4.3
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==2.8
dbus-python==1.2.16
distro==1.4.0
distro-info===0.23ubuntu1
dnspython==2.3.0
entrypoints==0.3
eventlet==0.33.3
Flask==2.2.3
Flask-Cors==3.0.10
Flask-Mail==0.9.1
Flask-PyMongo==2.3.0
Flask-SocketIO==5.3.3
gcm==0.3
geojson==3.0.1
greenlet==2.0.2
httplib2==0.14.0
hyperlink==19.0.0
idna==2.8
importlib-metadata==6.1.0
incremental==16.10.1
itsdangerous==2.1.2
Jinja2==3.1.2
jsonpatch==1.22
jsonpointer==2.0
jsonschema==3.2.0
keyring==18.0.1
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
MarkupSafe==2.1.2
more-itertools==4.2.0
netifaces==0.10.4
oauthlib==3.1.0
pexpect==4.6.0
pika==1.3.1
psycopg2-binary==2.9.5
pyasn1==0.4.2
pyasn1-modules==0.2.1
PyGObject==3.36.0
PyHamcrest==1.9.0
PyJWT==1.7.1
pymacaroons==0.13.0
pymongo==4.3.3
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyrsistent==0.15.5
pyserial==3.4
python-apt==2.0.0+ubuntu0.20.4.8
python-dateutil==2.8.2
python-debian===0.1.36ubuntu1
python-engineio==4.4.0
python-socketio==5.8.0
pytz==2022.7.1
PyYAML==5.3.1
requests==2.22.0
requests-unixsocket==0.2.0
SecretStorage==2.3.1
service-identity==18.1.0
simplejson==3.16.0
six==1.14.0
sos==4.3
ssh-import-id==5.10
systemd-python==234
Twisted==18.9.0
ubuntu-advantage-tools==27.10
ufw==0.36
unattended-upgrades==0.1
urllib3==1.25.8
wadllib==1.3.3
Werkzeug==2.2.3
zipp==1.0.0
zope.interface==4.7.1
When I am trying to connect with MongoDB, I am getting the following errors:
pymongo.errors.ServerSelectionTimeoutError: module 'select' has no attribute 'poll', Timeout: 30s, Topology Description: <TopologyDescription id: 64194b57c10b6127e5048035, topology_type: Single, servers: [<ServerDescription ('192.168.1.214', 27017) server_type: Unknown, rtt: None, error=AttributeError("module 'select' has no attribute 'poll'")>]>
My code:
application.config["MONGO_URI"] = 'mongodb://192.168.1.214:27017/kaa?directConnection=true&connect=false'
def MongoConnect():
global db
print('Starting Mongo Client.')
mongo = PyMongo(application)
db = mongo.db
serverStatusResult=db.command("serverStatus")
pprint(serverStatusResult)
I am starting my flask-socketio application like the below code:
if __name__=='__main__': try: MongoConnect() ThresholdValue() #socketData = socketio.start_background_task(sendData) socketio.run(application, host='192.168.1.214',debug = True) #print('Application starts.') except KeyboardInterrupt: #socketData.join() print("Application ends")
Beta Was this translation helpful? Give feedback.
All reactions