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

0.8 issues on Mac os #12

Open
couteau opened this issue Aug 8, 2023 · 6 comments
Open

0.8 issues on Mac os #12

couteau opened this issue Aug 8, 2023 · 6 comments

Comments

@couteau
Copy link

couteau commented Aug 8, 2023

On Mac OS, activating the plugin causes a new instance of QGIS to be run and hangs the original instance. The new instance seems to be running in a more limited environment (no access to saved credentials, e.g.). This did not happen with the ptsd version -- it started immediately with the upgrade to 0.8. I am reverting to 0.7 for now.

@chau-intl
Copy link

chau-intl commented Aug 18, 2023

I have just discovered that I have exactly the same issue on Windows 10. The first QGIS instance reports the following:

Traceback (most recent call last):

File "C:\OSGeo4W\apps\Python39\lib\site-packages\debugpy\server\api.py", line 237, in listen
sock, _ = endpoints_listener.accept()
File "C:\OSGeo4W\apps\Python39\lib\socket.py", line 293, in accept
fd, addr = self._accept()
socket.timeout: timed out
             
During handling of the above exception, another exception occurred:
             
Traceback (most recent call last):
File "C:\Users/MYUSER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\debug_vs\__init__.py", line 134, in enable
t_, self.port = self.debugpy.listen((self.host, self.port))
File "C:\OSGeo4W\apps\Python39\lib\site-packages\debugpy\public_api.py", line 31, in wrapper
return wrapped(*args, **kwargs)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\debugpy\server\api.py", line 143, in debug
log.reraise_exception("{0}() failed:", func.__name__, level="info")
File "C:\OSGeo4W\apps\Python39\lib\site-packages\debugpy\server\api.py", line 141, in debug
return func(address, settrace_kwargs, **kwargs)
File "C:\OSGeo4W\apps\Python39\lib\site-packages\debugpy\server\api.py", line 251, in listen
raise RuntimeError("timed out waiting for adapter to connect")
RuntimeError: timed out waiting for adapter to connect

While the second QGIS instance reports:

2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\OSGeo4W\apps\Python39\lib\site-packages\debugpy\adapter is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\--for-server is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\62052 is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\--host is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\localhost is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\--port is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\5678 is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\--server-access-token is not a valid or recognized data source.
2023-08-18T08:48:42     CRITICAL    Invalid Data Source : C:\Users\MYUSER\Documents\fa9381aecc239fc479b9b12691059613766fdcf706da51400093d9354b7e48c6 is not a valid or recognized data source.

@fruitbaticus
Copy link

Same exact issue on Windows 10 as @chau-intl

@vedrk5672
Copy link

Same issue on windows 11 as well

@vedrk5672
Copy link

in init.py where debugpy is imported,

write like this

        import debugpy

        self.debugpy = debugpy
        self.debugpy.configure(python = 'python3')

It will work after that

@attentive
Copy link

I can confirm this issue is occurring on latest MacOS Ventura and QGIS-LTR (3.28.10-Firenze) as well. I haven't attempted troubleshooting but was able to revert to 0.7 to use the debugvs plug-in.

@vedrk5672
Copy link

vedrk5672 commented Sep 25, 2023

Aug 25, 2023

It will still not work just by adding shutil.which python, as debugpy doesn't have any api which tells whether a session is already there or not, so need to add check enable method of init.py file

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

5 participants