Hello,
I'm getting an error, HTTP Error 500: Internal Server Error, when running this notebook. All seems fine until it reaches Step 7 - 'Define the channels to use for segmentation'
Many thanks if you have any advice on this.
Huw
<>:86: SyntaxWarning: "is" with a literal. Did you mean "=="?
<>:86: SyntaxWarning: "is" with a literal. Did you mean "=="?
Using model LC4
HTTPError Traceback (most recent call last)
in <cell line: 68>()
66 # DEFINE CELLPOSE MODEL
67 # model_type='cyto' or model_type='nuclei'
---> 68 model = models.Cellpose(gpu=use_GPU, model_type=model_type, net_avg = True)#, omni = omni
69
70 # define CHANNELS to run segementation on
9 frames
/usr/local/lib/python3.10/dist-packages/cellpose/models.py in init(self, gpu, model_type, net_avg, device)
98
99 # size model not used for bacterial model
--> 100 self.pretrained_size = size_model_path(model_type, self.torch)
101 self.sz = SizeModel(device=self.device, pretrained_size=self.pretrained_size,
102 cp_model=self.cp)
/usr/local/lib/python3.10/dist-packages/cellpose/models.py in size_model_path(model_type, use_torch)
33 torch_str = 'torch'
34 basename = 'size_%s%s_0.npy' % (model_type, torch_str)
---> 35 return cache_model_path(basename)
36
37 def cache_model_path(basename):
/usr/local/lib/python3.10/dist-packages/cellpose/models.py in cache_model_path(basename)
41 if not os.path.exists(cached_file):
42 models_logger.info('Downloading: "{}" to {}\n'.format(url, cached_file))
---> 43 utils.download_url_to_file(url, cached_file, progress=True)
44 return cached_file
45
/usr/local/lib/python3.10/dist-packages/cellpose/utils.py in download_url_to_file(url, dst, progress)
63 import ssl
64 ssl._create_default_https_context = ssl._create_unverified_context
---> 65 u = urlopen(url)
66 meta = u.info()
67 if hasattr(meta, 'getheaders'):
/usr/lib/python3.10/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
214 else:
215 opener = _opener
--> 216 return opener.open(url, data, timeout)
217
218 def install_opener(opener):
/usr/lib/python3.10/urllib/request.py in open(self, fullurl, data, timeout)
523 for processor in self.process_response.get(protocol, []):
524 meth = getattr(processor, meth_name)
--> 525 response = meth(req, response)
526
527 return response
/usr/lib/python3.10/urllib/request.py in http_response(self, request, response)
632 # request was successfully received, understood, and accepted.
633 if not (200 <= code < 300):
--> 634 response = self.parent.error(
635 'http', request, response, code, msg, hdrs)
636
/usr/lib/python3.10/urllib/request.py in error(self, proto, *args)
561 if http_err:
562 args = (dict, 'default', 'http_error_default') + orig_args
--> 563 return self._call_chain(*args)
564
565 # XXX probably also want an abstract factory that knows when it makes
/usr/lib/python3.10/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
494 for handler in handlers:
495 func = getattr(handler, meth_name)
--> 496 result = func(*args)
497 if result is not None:
498 return result
/usr/lib/python3.10/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
641 class HTTPDefaultErrorHandler(BaseHandler):
642 def http_error_default(self, req, fp, code, msg, hdrs):
--> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp)
644
645 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 500: INTERNAL SERVER ERROR