Unfortunately that does not work for me either. I am getting following error code:
RemoteTraceback Traceback (most recent call last)
_RemoteTraceback:
“”"
Traceback (most recent call last):
File “/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/process.py”, line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File “/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/process.py”, line 198, in _process_chunk
return [fn(*args) for args in chunk]
File “/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/process.py”, line 198, in
return [fn(*args) for args in chunk]
File “/opt/conda/envs/fastai/lib/python3.8/site-packages/fastcore/xtras.py”, line 367, in _call
return g(item)
File “/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/vision/utils.py”, line 13, in _download_image_inner
suffix = re.findall(r’.\w+?(?=(?:?|$))’, url)
File “/opt/conda/envs/fastai/lib/python3.8/re.py”, line 241, in findall
return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object
“”"
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
in
3 dest.mkdir(exist_ok=True)
4 results = search_images_bing(key, f’{o} bear’)
----> 5 download_images(dest, urls=results.attrgot(‘content_url’))
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/vision/utils.py in download_images(dest, url_file, urls, max_pics, n_workers, timeout)
22 dest = Path(dest)
23 dest.mkdir(exist_ok=True)
—> 24 parallel(partial(_download_image_inner, dest, timeout=timeout), list(enumerate(urls)), n_workers=n_workers)
25
26 # Cell
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastcore/xtras.py in parallel(f, items, n_workers, total, progress, pause, threadpool, timeout, chunksize, *args, **kwargs)
418 if total is None: total = len(items)
419 r = progress_bar(r, total=total, leave=False)
–> 420 return L®
421
422 # Cell
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastcore/foundation.py in call(cls, x, *args, **kwargs)
161 def call(cls, x=None, *args, **kwargs):
162 if not args and not kwargs and x is not None and isinstance(x,cls): return x
–> 163 return super().call(x, *args, **kwargs)
164
165 # Cell
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastcore/foundation.py in init(self, items, use_list, match, *rest)
171 if items is None: items = []
172 if (use_list is not None) or not is_array(items):
–> 173 items = list(items) if use_list else listify(items)
174 if match is not None:
175 if is_coll(match): match = len(match)
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastcore/basics.py in listify(o)
49 if isinstance(o, list): return o
50 if isinstance(o, str) or is_array(o): return [o]
—> 51 if is_iter(o): return list(o)
52 return [o]
53
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastprogress/fastprogress.py in iter(self)
45 except Exception as e:
46 self.on_interrupt()
—> 47 raise e
48
49 def update(self, val):
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastprogress/fastprogress.py in iter(self)
39 if self.total != 0: self.update(0)
40 try:
—> 41 for i,o in enumerate(self.gen):
42 if i >= self.total: break
43 yield o
/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/process.py in _chain_from_iterable_of_lists(iterable)
482 careful not to keep references to yielded objects.
483 “”"
–> 484 for element in iterable:
485 element.reverse()
486 while element:
/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/_base.py in result_iterator()
609 # Careful not to keep a reference to the popped future
610 if timeout is None:
–> 611 yield fs.pop().result()
612 else:
613 yield fs.pop().result(end_time - time.monotonic())
/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/_base.py in result(self, timeout)
430 raise CancelledError()
431 elif self._state == FINISHED:
–> 432 return self.__get_result()
433
434 self._condition.wait(timeout)
/opt/conda/envs/fastai/lib/python3.8/concurrent/futures/_base.py in __get_result(self)
386 def __get_result(self):
387 if self._exception:
–> 388 raise self._exception
389 else:
390 return self._result
TypeError: expected string or bytes-like object
Can anyone help with that? Much appreciate it