Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-706

Include tornado and dnspython as install_Requires

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.3.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows Server 2012R2
      Python 3.8

      Hello,

      I just installed motor and I was trying to connect to my mongoDB database.

      I followed the example as in the documentation

       

       

      import motor
      client = motor.motor_tornado.MotorClient(
       "mongodb+srv://user:pass@127.0.0.1/test?retryWrites=true&w=majority")
      db = client.test
      

       

       

      and I get the following error:

       

      Traceback (most recent call last):
       File "....py", line 7, in <module>
       client = motor.motor_tornado.MotorClient(
      AttributeError: module 'motor' has no attribute 'motor_tornado' 
      

      I think the error is catched because if i import the module

      from motor import motor_tornado

      The real error appears:

      Traceback (most recent call last):
       File "C:/Users/c.galleguillos/PycharmProjects/testing/mongodb/loader.py", line 1, in <module>
       from motor import motor_tornado
       File "C:\Users\c.galleguillos\PycharmProjects\testing\venv\lib\site-packages\motor\motor_tornado.py", line 18, in <module>
       from .frameworks import tornado as tornado_framework
       File "C:\Users\c.galleguillos\PycharmProjects\testing\venv\lib\site-packages\motor\frameworks\tornado\__init__.py", line 22, in <module>
       import tornado.process
      ModuleNotFoundError: No module named 'tornado'

      I also got a missing package error of the dnspython package.

      So, i think tornado and dnspython should be considered as dependencies and be specified in the install_requires keyword of the setup.py, or the error must be clear to the user.

       

      Thanks

       

       

       

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            cgmiccono@gmail.com Cristian Galleguillos Miccono
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: