Felix Jing Posted August 12, 2020 Share Posted August 12, 2020 Good morning there, I updated my spy module to 48 by using: pip install -U seeq~=0.48.6 so now i have updated spy module, in the juptor notebook, when i did " from seeq import spy", it raises SyntaxError: future feature annotations is not defined . Is there something new about data lab that i am not aware of? Thank you Link to comment Share on other sites More sharing options...
Felix Jing Posted August 12, 2020 Author Share Posted August 12, 2020 Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-b0f74fece2f3>", line 1, in <module> from seeq import spy File "C:\Users\feijing\AppData\Roaming\Python\Python36\site-packages\seeq\spy\__init__.py", line 5, in <module> from . import assets File "C:\Users\feijing\AppData\Roaming\Python\Python36\site-packages\seeq\spy\assets\__init__.py", line 1, in <module> from ._build import build File "C:\Users\feijing\AppData\Roaming\Python\Python36\site-packages\seeq\spy\assets\_build.py", line 5, in <module> from .. import _common File "C:\Users\feijing\AppData\Roaming\Python\Python36\site-packages\seeq\spy\_common.py", line 1 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined Link to comment Share on other sites More sharing options...
Seeq Team Mark Derbecker Posted August 12, 2020 Seeq Team Share Posted August 12, 2020 (edited) Hi Felix, is it possible for you to upgrade to Python 3.7+? That will fix the problem. I'm hoping to use Python 3.7 features in SPy from here forward so that we can make the library more modern with type annotations. Edited August 12, 2020 by Mark Derbecker 1 Link to comment Share on other sites More sharing options...
Sanman Posted August 12, 2020 Share Posted August 12, 2020 Mark beat me to it. I ran into this earlier in the week. You would want to upgrade your anaconda navigator that has python 3.7(or higher) from software center. Please reach out to me directly if you need further help. Link to comment Share on other sites More sharing options...
Felix Jing Posted August 13, 2020 Author Share Posted August 13, 2020 so i updated my python to 3.7.7 and i am able to connect it. Then when i search the signal metadata_df = spy.search(list) I got this error Initializing --------------------------------------------------------------------------- ConnectionRefusedError Traceback (most recent call last) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\connection.py in _new_conn(self) 159 conn = connection.create_connection( --> 160 (self._dns_host, self.port), self.timeout, **extra_kw 161 ) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options) 83 if err is not None: ---> 84 raise err 85 c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options) 73 sock.bind(source_address) ---> 74 sock.connect(sa) 75 return sock ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred: NewConnectionError Traceback (most recent call last) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 676 headers=headers, --> 677 chunked=chunked, 678 ) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 391 else: --> 392 conn.request(method, url, **httplib_request_kw) 393 c:\programdata\anaconda3\envs\seeq\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 1251 """Send a complete request to the server.""" -> 1252 self._send_request(method, url, body, headers, encode_chunked) 1253 c:\programdata\anaconda3\envs\seeq\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 1297 body = _encode(body, 'body') -> 1298 self.endheaders(body, encode_chunked=encode_chunked) 1299 c:\programdata\anaconda3\envs\seeq\lib\http\client.py in endheaders(self, message_body, encode_chunked) 1246 raise CannotSendHeader() -> 1247 self._send_output(message_body, encode_chunked=encode_chunked) 1248 c:\programdata\anaconda3\envs\seeq\lib\http\client.py in _send_output(self, message_body, encode_chunked) 1025 del self._buffer[:] -> 1026 self.send(msg) 1027 c:\programdata\anaconda3\envs\seeq\lib\http\client.py in send(self, data) 965 if self.auto_open: --> 966 self.connect() 967 else: c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\connection.py in connect(self) 186 def connect(self): --> 187 conn = self._new_conn() 188 self._prepare_conn(conn) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\connection.py in _new_conn(self) 171 raise NewConnectionError( --> 172 self, "Failed to establish a new connection: %s" % e 173 ) NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001D72C8658C8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred: MaxRetryError Traceback (most recent call last) c:\programdata\anaconda3\envs\seeq\lib\site-packages\requests\adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 retries=self.max_retries, --> 449 timeout=timeout 450 ) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 726 retries = retries.increment( --> 727 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] 728 ) c:\programdata\anaconda3\envs\seeq\lib\site-packages\urllib3\util\retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 438 if new_retry.is_exhausted(): --> 439 raise MaxRetryError(_pool, url, error or ResponseError(cause)) 440 MaxRetryError: HTTPConnectionPool(host='localhost', port=34216): Max retries exceeded with url: /api/folders?filter=OWNER&isArchived=false&sortOrder=createdAt%20ASC&limit=100000&onlyPinned=false (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D72C8658C8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')) During handling of the above exception, another exception occurred: ConnectionError Traceback (most recent call last) <ipython-input-27-65855ddb683c> in <module> 28 ]) 29 ---> 30 metadata_df = spy.search(list) c:\programdata\anaconda3\envs\seeq\lib\site-packages\seeq\spy\_search.py in search(query, all_properties, workbook, recursive, ignore_unindexed_properties, include_archived, estimate_sample_period, quiet, status) 187 return _search(query, all_properties=all_properties, workbook=workbook, recursive=recursive, 188 ignore_unindexed_properties=ignore_unindexed_properties, include_archived=include_archived, --> 189 estimate_sample_period=estimate_sample_period, quiet=quiet, status=status, input_args=input_args) 190 191 except KeyboardInterrupt: c:\programdata\anaconda3\envs\seeq\lib\site-packages\seeq\spy\_search.py in _search(query, all_properties, workbook, recursive, ignore_unindexed_properties, include_archived, estimate_sample_period, quiet, status, input_args) 334 else: 335 search_query, _ = _push.create_analysis_search_query(workbook) --> 336 search_df = spy.workbooks.search(search_query, status=status.create_inner('Find Workbook', quiet=True)) 337 workbook_id = search_df.iloc[0]['ID'] if len(search_df) > 0 else None 338 c:\programdata\anaconda3\envs\seeq\lib\site-packages\seeq\spy\workbooks\_search.py in search(query, content_filter, all_properties, recursive, include_archived, quiet, status) 95 try: 96 results_df = _search(query, content_filter=content_filter, all_properties=all_properties, recursive=recursive, ---> 97 include_archived=include_archived) 98 99 except KeyboardInterrupt: c:\programdata\anaconda3\envs\seeq\lib\site-packages\seeq\spy\workbooks\_search.py in _search(query, content_filter, all_properties, recursive, include_archived, parent_id, parent_path, search_folder_id) 182 contents.extend(folder_output_list['content']) 183 --> 184 _add_to_folder_contents(False) 185 if include_archived: 186 _add_to_folder_contents(True) c:\programdata\anaconda3\envs\seeq\lib\site-packages\seeq\spy\workbooks\_search.py in _add_to_folder_contents(archived) 178 else: 179 folder_output_list = get_folders(content_filter=content_filter, --> 180 archived=archived) 181 182 contents.extend(folder_output_list['content']) c:\programdata\anaconda3\envs\seeq\lib\site-packages\seeq\spy\workbooks\_search.py in get_folders(content_filter, folder_id, archived, sort_order, only_pinned) 299 "Accept": "application/vnd.seeq.v1+json", 300 "x-sq-auth": _login.client.auth_token --> 301 }, verify=_login.https_verify_ssl) 302 303 return json.loads(response.content) c:\programdata\anaconda3\envs\seeq\lib\site-packages\requests\api.py in get(url, params, **kwargs) 74 75 kwargs.setdefault('allow_redirects', True) ---> 76 return request('get', url, params=params, **kwargs) 77 78 c:\programdata\anaconda3\envs\seeq\lib\site-packages\requests\api.py in request(method, url, **kwargs) 59 # cases, and look like a memory leak in others. 60 with sessions.Session() as session: ---> 61 return session.request(method=method, url=url, **kwargs) 62 63 c:\programdata\anaconda3\envs\seeq\lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 528 } 529 send_kwargs.update(settings) --> 530 resp = self.send(prep, **send_kwargs) 531 532 return resp c:\programdata\anaconda3\envs\seeq\lib\site-packages\requests\sessions.py in send(self, request, **kwargs) 641 642 # Send the request --> 643 r = adapter.send(request, **kwargs) 644 645 # Total elapsed time of the request (approximately) c:\programdata\anaconda3\envs\seeq\lib\site-packages\requests\adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 514 raise SSLError(e, request=request) 515 --> 516 raise ConnectionError(e, request=request) 517 518 except ClosedPoolError as e: ConnectionError: HTTPConnectionPool(host='localhost', port=34216): Max retries exceeded with url: /api/folders?filter=OWNER&isArchived=false&sortOrder=createdAt%20ASC&limit=100000&onlyPinned=false (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D72C8658C8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')) Link to comment Share on other sites More sharing options...
Seeq Team Mark Derbecker Posted August 13, 2020 Seeq Team Share Posted August 13, 2020 Hi Felix, you unfortunately hit a bug that I introduced in SPy versions 165-166. It's fixed in 167. You can do `pip install -U seeq~=0.48.6` to get the latest. Link to comment Share on other sites More sharing options...
Felix Jing Posted August 13, 2020 Author Share Posted August 13, 2020 i did use pip install -U seeq~=0.48.6 and installed the version 165, how can I get 167? Link to comment Share on other sites More sharing options...
Felix Jing Posted August 13, 2020 Author Share Posted August 13, 2020 Seeq Server Version: R22.0.48.06-v202007180202 Seeq Python Module Version: 0.48.6.165 Link to comment Share on other sites More sharing options...
Seeq Team Mark Derbecker Posted August 14, 2020 Seeq Team Share Posted August 14, 2020 (edited) It should be available: https://pypi.org/project/seeq/0.48.6.167/ You can do pip install -U seeq==0.48.6.167 to force it. Edited August 14, 2020 by Mark Derbecker Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now