feihoo87 / qulab Goto Github PK
View Code? Open in Web Editor NEWA framework for researchers
Home Page: https://qulab.readthedocs.org
License: MIT License
A framework for researchers
Home Page: https://qulab.readthedocs.org
License: MIT License
AttributeError Traceback (most recent call last)
in ()
----> 1 lab.open_resource('33120A')
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab_bootstrap.py in open_resource(name, host, timeout)
133 if __inst_mgr is None:
134 open_instrument_mgr()
--> 135 return __inst_mgr.open_resource(name, host=host, timeout=timeout)
136
137
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py in open_resource(self, instrument, host, timeout)
159 if isinstance(instrument, str):
160 instrument = _schema.getInstrumentByName(instrument)
--> 161 if instrument.host == 'localhost' and host is None:
162 return self.open_local_resource(instrument, timeout)
163 else:
AttributeError: 'NoneType' object has no attribute 'host'
Display used time when running an application.
System and QuLab version:
Steps to reproduce:
ATS=lab.open_resource('SMF100A')
print(ATS.model)
Expected behavior:
Actual behavior:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-e7ae88092c99> in <module>()
----> 1 ATS=lab.open_resource('SMF100A')
2 print(ATS.model)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\_bootstrap.py in open_resource(name, host, timeout)
139 if __inst_mgr is None:
140 open_instrument_mgr()
--> 141 return __inst_mgr.open_resource(name, host=host, timeout=timeout)
142
143
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py in open_resource(self, instrument, host, timeout)
177 instrument = inst
178 if instrument.host == 'localhost' and host is None:
--> 179 return self.open_local_resource(instrument, timeout)
180 else:
181 return self.open_remote_resource(instrument, host, timeout)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py in open_local_resource(self, instrument, timeout, **kwds)
165 protocol, addr = parse_resource_name(instrument.address)
166 if protocol in ['TCPIP']:
--> 167 return self._drvmgr_py.open(instrument, timeout=timeout, **kwds)
168 else:
169 return self._drvmgr_ni.open(instrument, timeout=timeout, **kwds)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py in open(self, instrument, **kw)
299 if instrument.name not in self.__instr.keys():
300 self.__instr[instrument.name] = self._open_resource(
--> 301 instrument.address, instrument.driver, **kw)
302 return self.__instr[instrument.name]
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py in _open_resource(self, addr, driver_data, **kw)
288 if info['type'] == 'Visa':
289 info = _open_visa_resource(self.rm, addr)
--> 290 Driver = _load_driver(driver_data)
291 info.update(kw)
292 ins = Driver(**info)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py in _load_driver(driver_data)
222 def _load_driver(driver_data):
223 log.debug('Loading driver %s ...' % driver_data.name)
--> 224 mod = importlib.import_module(driver_data.module.fullname)
225 return getattr(mod, 'Driver')
226
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\__init__.py in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
128
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'lab.drivers'
name | version | modules | time |
---|---|---|---|
Agilent_PNA | 1 | lab.drivers.Agilent_PNA | 2018-03-19 13:22:55.071428 |
Agilent_PSG_SignalGenerator | 1 | lab.drivers.Agilent_PSG_SignalGenerator | 2018-03-19 13:25:37.115696 |
DPO4104B | 1 | lab.drivers.DPO4104B | 2018-03-19 13:25:57.240847 |
IT6302 | 1 | lab.drivers.IT6302 | 2018-03-19 13:26:18.088040 |
SR620 | 1 | lab.drivers.SR620 | 2018-03-19 13:26:45.833626 |
Tek_AWG | 1 | lab.drivers.Tek_AWG | 2018-03-19 13:26:57.792310 |
driversÙ20A | 1 | Error! Module for driver not set | N/A |
最后一行
OperationFailure Traceback (most recent call last)
in ()
9 fullname = 'Li1d Zhiyuan')
10 user.password = '12345678'
---> 11 user.save()
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\mongoengine\document.py in save(self, force_insert, validate, clean, write_concern, cascade, cascade_kwargs, _refs, save_condition, signal_kwargs, **kwargs)
365
366 if self._meta.get('auto_create_index', True):
--> 367 self.ensure_indexes()
368
369 try:
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\mongoengine\document.py in ensure_indexes(cls)
847 warnings.warn(msg, DeprecationWarning)
848
--> 849 collection = cls._get_collection()
850 # 746: when connection is via mongos, the read preference is not necessarily an indication that
851 # this code runs on a secondary
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.
The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.
'''python
AttributeError Traceback (most recent call last)
in ()
----> 1 listDrivers()
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab_bootstrap.py in listDrivers()
141 def listDrivers():
142 ret = _schema.Driver.objects()
--> 143 ui.list_drivers(ret)
144
145 def listInstruments():
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\ui_init_.py in list_drivers(drivers)
47 for driver in drivers:
48 module = driver.module
---> 49 table.append('%s|%s|%s|%s' % (driver.name, driver.version, module.fullname, module.created_time))
50 if not module.is_package:
51 continue
AttributeError: 'NoneType' object has no attribute 'fullname'
'''
实现类似这样的中间层,
class AWGChannal(MiddleLayer):
def __init__(self, awg, channal):
self.awg = get_resource(awg)
self.channal = channal
def setValue(self, name, value):
{
'Offset': self._setOffset,
'Vpp': self._setVpp,
'Waveform': self._setWaveform
}[name](value)
def _setOffset(self, value):
self.awg.setValue('Offset', value, channal=self.channal)
...
将 app
与 instrument
隔离开,使 app
更通用。
System and QuLab version:
Steps to reproduce:
import lab
lab.login('lzy','12345678')
Expected behavior:
Actual behavior:
ImportError Traceback (most recent call last)
<ipython-input-3-6a894e955054> in <module>()
----> 1 import lab
2 lab.login('lzy','12345678')
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\__init__.py in <module>()
----> 1 from . import admin, util, waveform
2 from ._app import (Application, Sweep, exportApps, getAppClass, importApps,
3 make_app)
4 from ._bootstrap import (connect_db, get_current_notebook, get_current_user,
5 get_inputCells, listApps, listOneApp, listDrivers,
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\admin.py in <module>()
1 import getpass
2
----> 3 from . import _bootstrap, db
4
5
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\_bootstrap.py in <module>()
10 from mongoengine.connection import connect, disconnect
11
---> 12 from . import _importer, db, ui
13 from .config import config
14
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\_importer.py in <module>()
5 import sys
6
----> 7 from lab.config import caches_dir
8
9 from . import db
ImportError: cannot import name 'caches_dir'
import lab
import numpy as np
app = lab.make_app('TestApp').sweep([
('x', np.linspace(0, 1, 11))
])
lab.make_figure_for_app(app)
app.run()
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
Exception in callback draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79
handle: <Handle draw.<locals>.callback(figure=<lab._plot.No...000000539CA58>)(<Task finishe...le anymore',)>) at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py:79>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\events.py", line 127, in _run
self._callback(*self._args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 80, in callback
img, width, height = future.result()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_plot.py", line 59, in make_image_in_process
functools.partial(make_image, func, data, **kwds))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py", line 638, in run_in_executor
return futures.wrap_future(executor.submit(func, *args), loop=self)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\process.py", line 452, in submit
raise BrokenProcessPool('A child process terminated '
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore
results = lab.query()
results.display()
print('%d results found.' % results.count())
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-18-8ba9aa32f2d0> in <module>()
1 results = lab.query()
----> 2 results.display()
3 print('%d results found.' % results.count())
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\db\_query.py in display(self, start, stop, figsize)
138
139 def display(self, start=0, stop=10, figsize=None):
--> 140 self.ui.display(start, stop, figsize)
141
142
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\db\_query.py in display(self, start, stop, figsize)
35 for index, record in enumerate(self.querySet.query_set[start:stop]):
36 #tableHTML[index+2] = self.tableRow(index+start, record, figsize)
---> 37 task = asyncio.ensure_future(self.tableRow(index+start, record, figsize))
38 task.add_done_callback(functools.partial(callback, pos=index))
39 self._tasks.append(task)
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\tasks.py in ensure_future(coro_or_future, loop)
517 if loop is None:
518 loop = events.get_event_loop()
--> 519 task = loop.create_task(coro_or_future)
520 if task._source_traceback:
521 del task._source_traceback[-1]
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py in create_task(self, coro)
280 Return a task object.
281 """
--> 282 self._check_closed()
283 if self._task_factory is None:
284 task = tasks.Task(coro, loop=self)
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\asyncio\base_events.py in _check_closed(self)
355 def _check_closed(self):
356 if self._closed:
--> 357 raise RuntimeError('Event loop is closed')
358
359 def _asyncgen_finalizer_hook(self, agen):
RuntimeError: Event loop is closed
System and QuLab version:
Steps to reproduce:
Expected behavior:
Actual behavior:
Task exception was never retrieved
future: <Task finished coro=<Application.done() done, defined at E:\PYTHON\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py:190> exception=AlazarTechError("579, Error 'b'ApiWaitTimeout'' happens when calling function 'AlazarWaitNextAsyncBufferComplete'",)>
Traceback (most recent call last):
File "E:\PYTHON\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 193, in done
async for data in self.work():
File "db://id-5acdb1833e64aa43fc35d39b/lab/apps/codeID5acdb1833e64aa43fc35d39a.py", line 23, in work
y = await app.done()
File "E:\PYTHON\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 193, in done
async for data in self.work():
File "db://id-5ac8cc443e64aa3e48abfb5e/lab/apps/codeID5ac8cc443e64aa3e48abfb5d.py", line 21, in work
self.settings['repeats']))
File "E:\PYTHON\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "db://id-5ac8cc443e64aa3e48abfb5e/lab/apps/codeID5ac8cc443e64aa3e48abfb5d.py", line 24, in get_Amp
ch1, ch2 = self.rc['ATS'].getFFT(readout_len, 0, repeats, heterodyne_freq_list)
File "db://id-5acdb0bf3e64aa3bd005c406/lab/drivers/AlazarTech_Digitizer/AlazarTech_Digitizer.py", line 231, in getFFT
pre, samplesPerRecord-pre, repeats, procces, beforeCapture, timeout)
File "db://id-5ac8c1743e64aa3d349424a3/lab/drivers/AlazarTech_Digitizer/AlazarTech_Wrapper.py", line 306, in get_Traces_DMA
self.check_errors(ignores=[589])
File "db://id-5ac8c1743e64aa3d349424a3/lab/drivers/AlazarTech_Digitizer/AlazarTech_Wrapper.py", line 80, in check_errors
raise AlazarTechError(errors[-1][0], '%d, %s' % errors[-1])
lab.drivers.AlazarTech_Digitizer.AlazarTech_Wrapper.AlazarTechError: 579, Error 'b'ApiWaitTimeout'' happens when calling function 'AlazarWaitNextAsyncBufferComplete'
OperationFailure Traceback (most recent call last)
in ()
----> 1 from lab.server.server import main
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\server\server.py in ()
4
5 import tornado.ioloop
----> 6 import tornado.web
7 import tornado.websocket
8 from PyQt5 import QtCore, QtWidgets
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\tornado\web.py in ()
85 from tornado import gen
86 from tornado import httputil
---> 87 from tornado import iostream
88 from tornado import locale
89 from tornado.log import access_log, app_log, gen_log
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\tornado\iostream.py in ()
43
44 try:
---> 45 from tornado.platform.posix import _set_nonblocking
46 except ImportError:
47 _set_nonblocking = None
D:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\tornado\platform\posix.py in ()
19 from future import absolute_import, division, print_function
20
---> 21 import fcntl
22 import os
23
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.
Task exception was never retrieved
future: <Task finished coro=<Application.done() done, defined at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py:237> exception=AttributeError("'NoneType' object has no attribute 'version_tag'",)>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 239, in done
async for data in self.work():
File "<ipython-input-43-7fb1a30a2d3e>", line 6, in work
x,y = await app.done()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 243, in done
self.saveRecord(result)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 216, in saveRecord
self.status['current_record'] = self.newRecord()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 193, in newRecord
title=self.record_title(),
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 93, in record_title
version = '%s.%d' % (self.__AppData__.version_tag,
AttributeError: 'NoneType' object has no attribute 'version_tag'
System and QuLab version:
Steps to reproduce:
import lab
app = lab.make_app('NA.S21').with_rc({
'NA': 'VNA' # VNA 必须是已经添加到数据库里的设备名,即listInstruments()里面的
}).with_settings({
'repeat': 1
}).with_params(
power = [0, 'dBm'],
att = [-20, 'dB']
).with_tags('IMPA1','A2->A3')
lab.make_figure_for_app(app)
app.run()
Expected behavior:
Actual behavior:
Task exception was never retrieved
future: <Task finished coro=<Application.done() done, defined at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py:173> exception=SyntaxError('invalid syntax', ('B:\\WinPython-64bit-3.6.3.0Qt5\\python-3.6.3.amd64\\lib\\site-packages\\lab\\drivers\\NetworkAnalyzer.py', 31, 15, " QOption('SweepType', value='',\n"))>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 177, in done
async for data in self.work():
File "db://id-5ab8a1557a6a6dc4a47920df/lab/apps/codeID5ab8a1557a6a6dc4a47920de.py", line 17, in work
x = self.rc['NA'].get_Frequency()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 431, in __getitem__
return self.get(name)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 415, in get
return self.get_resource(name)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 428, in get_resource
return open_resource(name)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_bootstrap.py", line 142, in open_resource
return __inst_mgr.open_resource(name, host=host, timeout=timeout)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py", line 175, in open_resource
return self.open_local_resource(instrument, timeout)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py", line 163, in open_local_resource
return self._drvmgr_py.open(instrument, timeout=timeout, **kwds)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py", line 286, in open
instrument.address, instrument.driver, **kw)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py", line 276, in _open_resource
Driver = _load_driver(driver_data)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py", line 210, in _load_driver
mod = importlib.import_module(driver_data.module.fullname)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 674, in exec_module
File "<frozen importlib._bootstrap_external>", line 781, in get_code
File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\drivers\NetworkAnalyzer.py", line 31
QOption('SweepType', value='',
^
SyntaxError: invalid syntax
Server side
import asyncio
from qulab.sugar import getDHT, mount
class Main:
def iter(self):
for i in range(3):
yield i
async def start():
dht = await getDHT()
await mount(Main(), 'test')
loop = asyncio.get_event_loop()
asyncio.ensure_future(start(), loop=loop)
try:
loop.run_forever()
except KeyboardInterrupt:
loop.close()
Client side
import asyncio
from qulab.sugar import getDHT, connect
async def main():
dht = await getDHT()
c = await connect('test')
async for i in c.iter():
print(i)
asyncio.run(main())
PNA driver ,get_Frequency
ValueError Traceback (most recent call last)
<ipython-input-44-3633c0ceedbf> in <module>()
----> 1 x = rc.get_Frequency()
2
3 #data=lab.open_resource('PNA').get_Trace()
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\drivers\Agilent_PNA.py in get_Frequency(self, ch)
100 #Creat the frequency vector
101 #return np.linspace(freq_start, freq_stop, points)
--> 102 return np.asarray(self.query_ascii_values('CALC:X?'))
103
104 def set_segments(self, segments=[], form='Start Stop'):
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\device\_driver.py in query_ascii_values(self, message, converter, separator, container, delay, check_errors)
89 try:
90 res = self.ins.query_ascii_values(
---> 91 message, converter, separator, container, delay)
92 except:
93 log.exception("%s << %s", str(self.ins), message)
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\resources\messagebased.py in query_ascii_values(self, message, converter, separator, container, delay)
622
623 return self.read_ascii_values(converter, separator, container,
--> 624 delay)
625
626 def query_binary_values(self, message, datatype='f', is_big_endian=False,
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\resources\messagebased.py in read_ascii_values(self, converter, separator, container, delay)
447 block = self.read()
448
--> 449 return util.from_ascii_block(block, converter, separator, container)
450
451 def read_binary_values(self, datatype='f', is_big_endian=False,
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\util.py in from_ascii_block(ascii_data, converter, separator, container)
222 data = separator(ascii_data)
223
--> 224 return container([converter(raw_value) for raw_value in data])
225
226
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\util.py in <listcomp>(.0)
222 data = separator(ascii_data)
223
--> 224 return container([converter(raw_value) for raw_value in data])
225
226
ValueError: could not convert string to float:
System and QuLab version:
Steps to reproduce:
Expected behavior:
用GPIB连接的仪器和采集卡都会出现下面的错误,网线连接的仪器正常,错误的原因可能是昨天装软件的时候把原来的系统环境变量的路径清除覆盖了,我重装了NI还是有这个问题。不知道还有那个环境变量路径没有配置好
Actual behavior:
AttributeError Traceback (most recent call last)
<ipython-input-22-bbbb8bd22072> in <module>()
----> 1 ATS=lab.open_resource('ATS1')
2 print(ATS.model)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\_bootstrap.py in open_resource(name, host, timeout)
139 if __inst_mgr is None:
140 open_instrument_mgr()
--> 141 return __inst_mgr.open_resource(name, host=host, timeout=timeout)
142
143
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py in open_resource(self, instrument, host, timeout)
177 instrument = inst
178 if instrument.host == 'localhost' and host is None:
--> 179 return self.open_local_resource(instrument, timeout)
180 else:
181 return self.open_remote_resource(instrument, host, timeout)
b:\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\lab\device\client.py in open_local_resource(self, instrument, timeout, **kwds)
167 return self._drvmgr_py.open(instrument, timeout=timeout, **kwds)
168 else:
--> 169 return self._drvmgr_ni.open(instrument, timeout=timeout, **kwds)
170
171 def open_resource(self, instrument, host=None, timeout=10):
AttributeError: 'NoneType' object has no attribute 'open'
System and QuLab version:
Steps to reproduce:
Expected behavior:
Actual behavior:
Task exception was never retrieved
future: <Task finished coro=<Application.done() done, defined at B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py:177> exception=AlazarTechError("582, Error 'b'ApiBufferOverflow'' happens when calling function 'AlazarWaitNextAsyncBufferComplete'",)>
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 181, in done
async for data in self.work():
File "db://id-5ac06f627a6a6d3d144a4c12/lab/apps/codeID5ac06f627a6a6d3d144a4c11.py", line 23, in work
y = await app.done()
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\_app.py", line 181, in done
async for data in self.work():
File "db://id-5ac08ad97a6a6d43ec58e358/lab/apps/codeID5ac08ad97a6a6d43ec58e357.py", line 21, in work
self.settings['repeats']))
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\concurrent\futures\thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "db://id-5ac08ad97a6a6d43ec58e358/lab/apps/codeID5ac08ad97a6a6d43ec58e357.py", line 24, in get_Amp
ch1, ch2 = self.rc['ATS'].getFFT(readout_len, 0, repeats, heterodyne_freq_list)
File "db://id-5ab8612d7a6a6d62cc1dfba0/lab/drivers/AlazarTech_Digitizer/AlazarTech_Digitizer.py", line 230, in getFFT
pre, samplesPerRecord-pre, repeats, procces, beforeCapture, timeout)
File "db://id-5ab8612d7a6a6d62cc1dfba2/lab/drivers/AlazarTech_Digitizer/AlazarTech_Wrapper.py", line 306, in get_Traces_DMA
self.check_errors(ignores=[589])
File "db://id-5ab8612d7a6a6d62cc1dfba2/lab/drivers/AlazarTech_Digitizer/AlazarTech_Wrapper.py", line 80, in check_errors
raise AlazarTechError(errors[-1][0], '%d, %s' % errors[-1])
lab.drivers.AlazarTech_Digitizer.AlazarTech_Wrapper.AlazarTechError: 582, Error 'b'ApiBufferOverflow'' happens when calling function 'AlazarWaitNextAsyncBufferComplete'
Raise warning when call make_image_in_process
in the first time
venv/lib/python3.6/site-packages/pymongo/topology.py:149: UserWarning: MongoClient opened before fork. Create MongoClient only after forking. See PyMongo's documentation for details: http://api.mongodb.org/python/current/faq.html#is-pymongo-fork-safe
"MongoClient opened before fork. Create MongoClient only "
Add driver for WX2184 lab/drivers/wx_AWG.py
'''python
from lab._bootstrap import listApps,listDrivers,listInstruments,setInstrument
listApps()
'''
ImportError: cannot import name 'setInstrument'
ServerSelectionTimeoutError Traceback (most recent call last)
<ipython-input-2-bd3002ffc4a2> in <module>()
----> 1 lab.login(username='lzy',password='12345678')
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\lab\_bootstrap.py in wrapper(*args, **kwds)
52 def wrapper(*args, **kwds):
53 _connect_db()
---> 54 return func(*args, **kwds)
55
56 return wrapper
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\lab\_bootstrap.py in login(username, password, relogin)
77 if username is None:
78 username, password = ui.get_login_info()
---> 79 user = _schema.User.objects(name=username).first()
80 if user is not None and user.check_password(password):
81 __login_info['user'] = user
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.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.1.0Qt5\python-3.6.1.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.1.0Qt5\python-3.6.1.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.1.0Qt5\python-3.6.1.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.1.0Qt5\python-3.6.1.amd64\lib\site-packages\pymongo\database.py in authenticate(self, name, password, source, mechanism, **kwargs)
1046 self.name,
1047 credentials,
-> 1048 connect=True)
1049
1050 return True
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\pymongo\mongo_client.py in _cache_credentials(self, source, credentials, connect)
498 if connect:
499 server = self._get_topology().select_server(
--> 500 writable_preferred_server_selector)
501
502 # get_socket() logs out of the database if logged in with old
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\pymongo\topology.py in select_server(self, selector, server_selection_timeout, address)
212 return random.choice(self.select_servers(selector,
213 server_selection_timeout,
--> 214 address))
215
216 def select_server_by_address(self, address,
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\pymongo\topology.py in select_servers(self, selector, server_selection_timeout, address)
187 if server_timeout == 0 or now > end_time:
188 raise ServerSelectionTimeoutError(
--> 189 self._error_message(selector))
190
191 self._ensure_opened()
ServerSelectionTimeoutError: SSL handshake failed: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
System and QuLab version:
Steps to reproduce:
Expected behavior:
Actual behavior:
Installing collected packages: QuLab
Running setup.py install for QuLab ... done
Exception:
Traceback (most recent call last):
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pip\b
asecommand.py", line 215, in main
status = self.run(options, args)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pip\c
ommands\install.py", line 342, in run
prefix=options.prefix_path,
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pip\r
eq\req_set.py", line 784, in install
**kwargs
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pip\r
eq\req_install.py", line 919, in install
prepend_root(filename), egg_info_dir)
File "B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\ntpath.py", line 58
5, in relpath
path_drive, start_drive))
ValueError: path is on mount 'C:', start on mount 'B:'
PS B:\DATA\GitData_lzy\QuLab>
System and QuLab version:
Steps to reproduce:
Expected behavior:
Actual behavior:
/Users/feihoo87/Projects/QuLab/qulab/rpc.py in handle_request(self, source, msgID, method)
279 async def handle_request(self, source, msgID, method, *args, **kw):
280 """
281 Handle a request from source.
282 """
283 try:
284 func = self.getRequestHandler(method, source=source, msgID=msgID)
285 if 'timeout' in kw and not acceptArg(func, 'timeout'):
286 del kw['timeout']
287 if inspect.iscoroutinefunction(func):
288 result = await func(*args, **kw)
289 else:
290 result = await self.loop.run_in_executor(
->291 self.executor, functools.partial(func, *args, **kw))
292 if isinstance(result, Awaitable):
293 result = await result
294 except QuLabRPCError as e:
295 result = e
296 except Exception as e:
297 result = QuLabRPCServerError.make(e)
298 msg = pack(result)
299 await self.response(source, msgID, msg)
300
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py in run(self)
52 def run(self):
53 if not self.future.set_running_or_notify_cancel():
54 return
55
56 try:
-> 57 result = self.fn(*self.args, **self.kwargs)
58 except BaseException as exc:
59 self.future.set_exception(exc)
60 # Break a reference cycle with the exception 'exc'
61 self = None
62 else:
63 self.future.set_result(result)
64
/Users/feihoo87/Projects/QuLab/qulab/dht/protocol.py in rpc_ping(self, sender, nodeid)
67 def rpc_ping(self, sender, nodeid):
68 source = Node(nodeid, sender[0], sender[1])
-> 69 self.welcome_if_new(source)
70 return self.source_node.id
71
/Users/feihoo87/Projects/QuLab/qulab/dht/protocol.py in welcome_if_new(self, node)
131 def welcome_if_new(self, node):
132 """
133 Given a new node, send it all the keys/values it should be storing,
134 then add it to the routing table.
135 @param node: A new node that just joined (or that we just found out
136 about).
137 Process:
138 For each key in storage, get k closest nodes. If newnode is closer
139 than the furtherst in that list, and the node for this server
140 is closer than the closest in that list, then store the key/value
141 on the new node (per section 2.5 of the paper)
142 """
143 if not self.router.is_new_node(node):
144 return
145
146 log.info("never seen %s before, adding to router", node)
147 for key, value in self.storage:
148 keynode = Node(digest(key))
149 neighbors = self.router.find_neighbors(keynode)
150 if neighbors:
151 last = neighbors[-1].distance_to(keynode)
152 new_node_close = node.distance_to(keynode) < last
153 first = neighbors[0].distance_to(keynode)
154 this_closest = self.source_node.distance_to(keynode) < first
155 if not neighbors or (new_node_close and this_closest):
->156 asyncio.ensure_future(self.call_store(node, key, value))
157 self.router.add_contact(node)
158
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/tasks.py in ensure_future(coro_or_future, loop)
573 def ensure_future(coro_or_future, *, loop=None):
574 """Wrap a coroutine or an awaitable in a future.
575
576 If the argument is a Future, it is returned directly.
577 """
578 if coroutines.iscoroutine(coro_or_future):
579 if loop is None:
->580 loop = events.get_event_loop()
581 task = loop.create_task(coro_or_future)
582 if task._source_traceback:
583 del task._source_traceback[-1]
584 return task
585 elif futures.isfuture(coro_or_future):
586 if loop is not None and loop is not futures._get_loop(coro_or_future):
587 raise ValueError('loop argument must agree with Future')
588 return coro_or_future
589 elif inspect.isawaitable(coro_or_future):
590 return ensure_future(_wrap_awaitable(coro_or_future), loop=loop)
591 else:
592 raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
593 'required')
594
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/events.py in get_event_loop(self)
632 def get_event_loop(self):
633 """Get the event loop.
634
635 This may be None or an instance of EventLoop.
636 """
637 if (self._local._loop is None and
638 not self._local._set_called and
639 isinstance(threading.current_thread(), threading._MainThread)):
640 self.set_event_loop(self.new_event_loop())
641
642 if self._local._loop is None:
643 raise RuntimeError('There is no current event loop in thread %r.'
->644 % threading.current_thread().name)
645
646 return self._local._loop
647
AttributeError Traceback (most recent call last)
in ()
1 from lab import ui
----> 2 ui.list_drivers('Agilent_PNA')
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\ui_init_.py in list_drivers(drivers)
46 ]
47 for driver in drivers:
---> 48 table.append('%s|%s|%s' % (driver.name, '', ''))
49 for f in driver.files:
50 table.append('%s|%s|%s' % ('', f.name, f.modified_time))
AttributeError: 'str' object has no attribute 'name'
NameError Traceback (most recent call last)
in ()
5 _bootstrap._connect_db()
6
----> 7 register()
D:\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\lab\admin.py in register()
19 def register():
20 username, password, email, fullname = getRegisterInfo()
---> 21 user =User(name=username, email=email, fullname=fullname)
22 user.password = password
23 user.save()
NameError: name 'User' is not defined
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.
@Lagikna
I've merged RS_VNA.py
and Agilent_PNA.py
into a single file NetworkAnalyzer.py
. Please test weather it works well on your system.
I also add new features, test them pls.
freq = pna.getValue('Frequency')
gain = pna.getValue('Trace')
S21 = pna.getValue('S')
AttributeError Traceback (most recent call last)
in ()
----> 1 listDrivers()
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab_bootstrap.py in listDrivers()
141 def listDrivers():
142 ret = _schema.Driver.objects()
--> 143 ui.list_drivers(ret)
144
145 def listInstruments():
B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\lab\ui_init_.py in list_drivers(drivers)
47 for driver in drivers:
48 module = driver.module
---> 49 table.append('%s|%s|%s|%s' % (driver.name, driver.version, module.fullname, module.created_time))
50 for sub_module in module.modules:
51 table.append('%s|%s|%s|%s' % ('', '', sub_module.fullname, sub_module.created_time))
AttributeError: 'NoneType' object has no attribute 'fullname'
listInstruments()
| name | host | address | driver | |:----|:----|:----|:----|
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.