OperationFailure Traceback (most recent call last)
in ()
5 _bootstrap._connect_db()
6
----> 7 register()
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\admin.py in register()
18
19 def register():
---> 20 username, password, email, fullname = getRegisterInfo()
21 user = _schema.User(name=username, email=email, fullname=fullname)
22 user.password = password
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\admin.py in getRegisterInfo()
6
7 def getRegisterInfo():
----> 8 username = input('User Name > ')
9 password = getpass.getpass(prompt='Password > ')
10 password2 = getpass.getpass(prompt='Repeat Password > ')
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\ipykernel\kernelbase.py in raw_input(self, prompt)
703 self._parent_ident,
704 self._parent_header,
--> 705 password=False,
706 )
707
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\ipykernel\kernelbase.py in _input_request(self, prompt, ident, parent, password)
713 while True:
714 try:
--> 715 self.stdin_socket.recv_multipart(zmq.NOBLOCK)
716 except zmq.ZMQError as e:
717 if e.errno == zmq.EAGAIN:
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\zmq\sugar\socket.py in recv_multipart(self, flags, copy, track)
393
394 """
--> 395 parts = [self.recv(flags, copy=copy, track=track)]
396 # have first part already, only loop while more to receive
397 while self.getsockopt(zmq.RCVMORE):
zmq\backend\cython\socket.pyx in zmq.backend.cython.socket.Socket.recv()
zmq\backend\cython\socket.pyx in zmq.backend.cython.socket.Socket.recv()
zmq\backend\cython\socket.pyx in zmq.backend.cython.socket._recv_copy()
zmq\backend\cython\socket.pyx in zmq.backend.cython.socket._recv_copy()
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\zmq\backend\cython\checkrc.pxd in zmq.backend.cython.checkrc._check_rc()
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\importlib_bootstrap.py in find_and_load(name, import)
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\importlib_bootstrap.py in find_and_load_unlocked(name, import)
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\importlib_bootstrap.py in _find_spec(name, path, target)
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab_importer.py in find_spec(self, fullname, path, target)
25 log.debug("find_spec: fullname=%r, path=%r, target=%r",
26 fullname, path, target)
---> 27 module_data = _schema.getModuleByFullname(fullname, self._before)
28 if module_data is not None:
29 log.debug("find_spec: module %r found", fullname)
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\db_schema.py in getModuleByFullname(fullname, before)
243 def getModuleByFullname(fullname, before=None):
244 before = now() if before is None else before
--> 245 return Module.objects(
246 fullname=fullname,
247 created_time__lt=before).order_by('-created_time').first()
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\mongoengine\queryset\manager.py in get(self, instance, owner)
35 # owner is the document that contains the QuerySetManager
36 queryset_class = owner._meta.get('queryset_class', self.default)
---> 37 queryset = queryset_class(owner, owner._get_collection())
38 if self.get_queryset:
39 arg_count = self.get_queryset.code.co_argcount
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\mongoengine\document.py in _get_collection(cls)
188 cls._collection = cls._get_capped_collection()
189 else:
--> 190 db = cls._get_db()
191 collection_name = cls._get_collection_name()
192 cls._collection = db[collection_name]
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\mongoengine\document.py in _get_db(cls)
177 def _get_db(cls):
178 """Some Model using other db_alias"""
--> 179 return get_db(cls._meta.get('db_alias', DEFAULT_CONNECTION_NAME))
180
181 @classmethod
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\mongoengine\connection.py in get_db(alias, reconnect)
233 if conn_settings['username'] and (conn_settings['password'] or
234 conn_settings['authentication_mechanism'] == 'MONGODB-X509'):
--> 235 db.authenticate(conn_settings['username'], conn_settings['password'], **auth_kwargs)
236 _dbs[alias] = db
237 return _dbs[alias]
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\database.py in authenticate(self, name, password, source, mechanism, **kwargs)
1073 self.name,
1074 credentials,
-> 1075 connect=True)
1076
1077 return True
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\mongo_client.py in _cache_credentials(self, source, credentials, connect)
545 # credentials, and logs in with new ones.
546 with server.get_socket(all_credentials) as sock_info:
--> 547 sock_info.authenticate(credentials)
548
549 # If several threads run _cache_credentials at once, last one wins.
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\pool.py in authenticate(self, credentials)
579 - credentials
: A MongoCredential.
580 """
--> 581 auth.authenticate(credentials, self)
582 self.authset.add(credentials)
583
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\auth.py in authenticate(credentials, sock_info)
484 mechanism = credentials.mechanism
485 auth_func = _AUTH_MAP.get(mechanism)
--> 486 auth_func(credentials, sock_info)
487
488
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\auth.py in _authenticate_default(credentials, sock_info)
464 def _authenticate_default(credentials, sock_info):
465 if sock_info.max_wire_version >= 3:
--> 466 return _authenticate_scram_sha1(credentials, sock_info)
467 else:
468 return _authenticate_mongo_cr(credentials, sock_info)
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\auth.py in _authenticate_scram_sha1(credentials, sock_info)
207 ('payload', Binary(b"n,," + first_bare)),
208 ('autoAuthorize', 1)])
--> 209 res = sock_info.command(source, cmd)
210
211 server_first = res['payload']
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\pool.py in command(self, dbname, spec, slave_ok, read_preference, codec_options, check, allowable_errors, check_keys, read_concern, write_concern, parse_write_concern_error, collation)
475 read_concern,
476 parse_write_concern_error=parse_write_concern_error,
--> 477 collation=collation)
478 except OperationFailure:
479 raise
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\network.py in command(sock, dbname, spec, slave_ok, is_mongos, read_preference, codec_options, check, allowable_errors, address, check_keys, listeners, max_bson_size, read_concern, parse_write_concern_error, collation)
114 helpers._check_command_response(
115 response_doc, None, allowable_errors,
--> 116 parse_write_concern_error=parse_write_concern_error)
117 except Exception as exc:
118 if publish:
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pymongo\helpers.py in _check_command_response(response, msg, allowable_errors, parse_write_concern_error)
208
209 msg = msg or "%s"
--> 210 raise OperationFailure(msg % errmsg, code, response)
211
212
OperationFailure: Authentication failed.