Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Within VS Code the wrong python is used. #5

Open
tomvanmele opened this issue May 11, 2020 · 3 comments
Open

Within VS Code the wrong python is used. #5

tomvanmele opened this issue May 11, 2020 · 3 comments
Assignees

Comments

@tomvanmele
Copy link
Member

(fofin) vanmelet@Tom-Van-Meles-MacBook-Pro compas-FormFinder % /Users/vanmelet/anaconda3/envs/fofin/bin/python /Users/vanmelet/Code/compas-FormFinder/scripts/02_fofin_fd_rhino.py
Starting new cloud server in background at 127.0.0.1:9000
Traceback (most recent call last):
  File "/Users/vanmelet/Code/compas_cloud/src/compas_cloud/proxy.py", line 214, in start_server
    client = Client(self.host, self.port)
  File "/Users/vanmelet/Code/compas_cloud/src/compas_cloud/client_websockets.py", line 28, in __init__
    asyncio.get_event_loop().run_until_complete(connect())
  File "/Users/vanmelet/anaconda3/envs/fofin/lib/python3.7/asyncio/base_events.py", line 583, in run_until_complete
    return future.result()
  File "/Users/vanmelet/Code/compas_cloud/src/compas_cloud/client_websockets.py", line 27, in connect
    self.websocket = await websockets.connect(uri, max_size=2**30)
  File "/Users/vanmelet/anaconda3/envs/fofin/lib/python3.7/site-packages/websockets/client.py", line 535, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/Users/vanmelet/anaconda3/envs/fofin/lib/python3.7/asyncio/base_events.py", line 958, in create_connection
    raise exceptions[0]
  File "/Users/vanmelet/anaconda3/envs/fofin/lib/python3.7/asyncio/base_events.py", line 945, in create_connection
    await self.sock_connect(sock, address)
  File "/Users/vanmelet/anaconda3/envs/fofin/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
    return await fut
  File "/Users/vanmelet/anaconda3/envs/fofin/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 61] Connect call failed ('127.0.0.1', 9000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/vanmelet/Code/compas-FormFinder/scripts/02_fofin_fd_rhino.py", line 34, in <module>
    proxy = Proxy()
  File "/Users/vanmelet/Code/compas_cloud/src/compas_cloud/proxy.py", line 90, in __init__
    self.client = self.start_server()
  File "/Users/vanmelet/Code/compas_cloud/src/compas_cloud/proxy.py", line 224, in start_server
    raise RuntimeError(err.decode())
RuntimeError: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named compas_cloud
@tomvanmele
Copy link
Member Author

the last line is no good :)

RuntimeError: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named compas_cloud

@Licini
Copy link
Collaborator

Licini commented May 15, 2020

@brgcode it uses compas._os.select_python() for getting the python executable. I think by calling the binary directly it somehow couldn't mount this part from compas_bootstrapper import PYTHON_DIRECTORY , let me see what to do to fix that.....
https://github.com/BlockResearchGroup/compas_cloud/blob/064483c5ad5e128e585aaa1b5d390c43d055342f/src/compas_cloud/proxy.py#L84

@Licini
Copy link
Collaborator

Licini commented Jul 21, 2020

@brgcode is this one still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants