demotomohiro / remocolab

remocolab is a Python module to allow remote access to Google Colaboratory using SSH or TurboVNC.
MIT License
316 stars 229 forks source link

String match issue, with standard set up #71

Closed bobvo23 closed 3 years ago

bobvo23 commented 3 years ago

There might be a hint to solve your problem in FAQ

Describe the bug

TypeError Traceback (most recent call last)

in () 1 get_ipython().system('pip install git+https://github.com/demotomohiro/remocolab.git') 2 import remocolab ----> 3 remocolab.setupVNC() 3 frames /usr/local/lib/python3.6/dist-packages/remocolab.py in setupVNC(ngrok_region, check_gpu_available, tunnel, mount_gdrive_to, mount_gdrive_from, public_key) 396 397 def setupVNC(ngrok_region = None, check_gpu_available = True, tunnel = "ngrok", mount_gdrive_to = None, mount_gdrive_from = None, public_key = None): --> 398 stat, msg = _setupSSHDMain(public_key, tunnel, ngrok_region, check_gpu_available, mount_gdrive_to, mount_gdrive_from, True) 399 if stat: 400 msg += _setupVNC() /usr/local/lib/python3.6/dist-packages/remocolab.py in _setupSSHDMain(public_key, tunnel, ngrok_region, check_gpu_available, mount_gdrive_to, mount_gdrive_from, is_VNC) 264 ngrok_region = region = input() 265 --> 266 return (True, _setupSSHDImpl(public_key, tunnel, ngrok_token, ngrok_region, mount_gdrive_to, mount_gdrive_from, is_VNC)) 267 268 def setupSSHD(ngrok_region = None, check_gpu_available = False, tunnel = "ngrok", mount_gdrive_to = None, mount_gdrive_from = None, public_key = None): /usr/local/lib/python3.6/dist-packages/remocolab.py in _setupSSHDImpl(public_key, tunnel, ngrok_token, ngrok_region, mount_gdrive_to, mount_gdrive_from, is_VNC) 186 pyngrok_config = pyngrok.conf.PyngrokConfig(auth_token = ngrok_token, region = ngrok_region) 187 url = pyngrok.ngrok.connect(port = 22, proto = "tcp", pyngrok_config = pyngrok_config) --> 188 m = re.match("tcp://(.+):(\d+)", url) 189 hostname = m.group(1) 190 port = m.group(2) /usr/lib/python3.6/re.py in match(pattern, string, flags) 170 """Try to apply the pattern at the start of the string, returning 171 a match object, or None if no match was found.""" --> 172 return _compile(pattern, flags).match(string) 173 174 def fullmatch(pattern, string, flags=0): TypeError: expected string or bytes-like object **To Reproduce** Steps to reproduce the behavior: Follow the standard tutorial !pip install git+https://github.com/demotomohiro/remocolab.git import remocolab remocolab.setupVNC() Any code that is executed before or after remocolab's setup code. No. **Expected behavior** A clear and concise description of what you expected to happen. Display the instructions to connect. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser: Edge **Additional context** Add any other context about the problem here.
Anon-Exploiter commented 3 years ago

Same issue.

POC: image

demotomohiro commented 3 years ago

Thank you for reporting the bug. There was API change in pyngrok. I fixed this bug.

Anon-Exploiter commented 3 years ago

Thanks, fine now.