Skip to content

๐Ÿž HTTP 404ย #3244

Closed
Closed

Description

@marta00x

Describe the bug

404 http error when downloading MVTecAD dataset.
Full traceback:
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ in _run_module_as_main:198 โ”‚
โ”‚ in _run_code:88 โ”‚
โ”‚ โ”‚
โ”‚ in :7 โ”‚
โ”‚ โ”‚
โ”‚ 4 from anomalib.cli.cli import main โ”‚
โ”‚ 5 if name == 'main': โ”‚
โ”‚ 6 โ”‚ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) โ”‚
โ”‚ โฑ 7 โ”‚ sys.exit(main()) โ”‚
โ”‚ 8 โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\cli\cli.py:492 โ”‚
โ”‚ in main โ”‚
โ”‚ โ”‚
โ”‚ 489 def main() -> None: โ”‚
โ”‚ 490 โ”‚ """Trainer via Anomalib CLI.""" โ”‚
โ”‚ 491 โ”‚ configure_logger() โ”‚
โ”‚ โฑ 492 โ”‚ AnomalibCLI() โ”‚
โ”‚ 493 โ”‚
โ”‚ 494 โ”‚
โ”‚ 495 if name == "main": โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\cli\cli.py:83 โ”‚
โ”‚ in init โ”‚
โ”‚ โ”‚
โ”‚ 80 โ”‚ โ”‚ โ”‚ self.before_instantiate_classes() โ”‚
โ”‚ 81 โ”‚ โ”‚ โ”‚ self.instantiate_classes() โ”‚
โ”‚ 82 โ”‚ โ”‚ if run: โ”‚
โ”‚ โฑ 83 โ”‚ โ”‚ โ”‚ self._run_subcommand() โ”‚
โ”‚ 84 โ”‚ โ”‚
โ”‚ 85 โ”‚ @staticmethod โ”‚
โ”‚ 86 โ”‚ def init_parser(**kwargs) -> ArgumentParser: โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\cli\cli.py:370 โ”‚
โ”‚ in _run_subcommand โ”‚
โ”‚ โ”‚
โ”‚ 367 โ”‚ โ”‚ elif self.config["subcommand"] in {*self.subcommands(), "train", "export", "pred โ”‚
โ”‚ 368 โ”‚ โ”‚ โ”‚ fn = getattr(self.engine, self.subcommand) โ”‚
โ”‚ 369 โ”‚ โ”‚ โ”‚ fn_kwargs = self._prepare_subcommand_kwargs(self.subcommand) โ”‚
โ”‚ โฑ 370 โ”‚ โ”‚ โ”‚ fn(**fn_kwargs) โ”‚
โ”‚ 371 โ”‚ โ”‚ elif PIPELINE_REGISTRY is not None and self.subcommand in pipeline_subcommands() โ”‚
โ”‚ 372 โ”‚ โ”‚ โ”‚ run_pipeline(self.config) โ”‚
โ”‚ 373 โ”‚ โ”‚ else: โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\engine\engine.p โ”‚
โ”‚ y:719 in train โ”‚
โ”‚ โ”‚
โ”‚ 716 โ”‚ โ”‚ โ”‚ # if the model is zero-shot or few-shot, we only need to run validate for no โ”‚
โ”‚ 717 โ”‚ โ”‚ โ”‚ self.trainer.validate(model, val_dataloaders, None, verbose=False, datamodul โ”‚
โ”‚ 718 โ”‚ โ”‚ else: โ”‚
โ”‚ โฑ 719 โ”‚ โ”‚ โ”‚ self.trainer.fit(model, train_dataloaders, val_dataloaders, datamodule, ckpt โ”‚
โ”‚ 720 โ”‚ โ”‚ return self.trainer.test(model, test_dataloaders, ckpt_path=ckpt_path, datamodul โ”‚
โ”‚ 721 โ”‚ โ”‚
โ”‚ 722 โ”‚ def export( โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\trainer.py:584 in fit โ”‚
โ”‚ โ”‚
โ”‚ 581 โ”‚ โ”‚ self.state.status = TrainerStatus.RUNNING โ”‚
โ”‚ 582 โ”‚ โ”‚ self.training = True โ”‚
โ”‚ 583 โ”‚ โ”‚ self.should_stop = False โ”‚
โ”‚ โฑ 584 โ”‚ โ”‚ call._call_and_handle_interrupt( โ”‚
โ”‚ 585 โ”‚ โ”‚ โ”‚ self, โ”‚
โ”‚ 586 โ”‚ โ”‚ โ”‚ self._fit_impl, โ”‚
โ”‚ 587 โ”‚ โ”‚ โ”‚ model, โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\call.py:49 in _call_and_handle_interrupt โ”‚
โ”‚ โ”‚
โ”‚ 46 โ”‚ try: โ”‚
โ”‚ 47 โ”‚ โ”‚ if trainer.strategy.launcher is not None: โ”‚
โ”‚ 48 โ”‚ โ”‚ โ”‚ return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, โ”‚
โ”‚ โฑ 49 โ”‚ โ”‚ return trainer_fn(*args, **kwargs) โ”‚
โ”‚ 50 โ”‚ โ”‚
โ”‚ 51 โ”‚ except _TunerExitException: โ”‚
โ”‚ 52 โ”‚ โ”‚ _call_teardown_hook(trainer) โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\trainer.py:630 in _fit_impl โ”‚
โ”‚ โ”‚
โ”‚ 627 โ”‚ โ”‚ โ”‚ model_provided=True, โ”‚
โ”‚ 628 โ”‚ โ”‚ โ”‚ model_connected=self.lightning_module is not None, โ”‚
โ”‚ 629 โ”‚ โ”‚ ) โ”‚
โ”‚ โฑ 630 โ”‚ โ”‚ self._run(model, ckpt_path=ckpt_path, weights_only=weights_only) โ”‚
โ”‚ 631 โ”‚ โ”‚ โ”‚
โ”‚ 632 โ”‚ โ”‚ assert self.state.stopped โ”‚
โ”‚ 633 โ”‚ โ”‚ self.training = False โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\trainer.py:1037 in _run โ”‚
โ”‚ โ”‚
โ”‚ 1034 โ”‚ โ”‚ self.__setup_profiler() โ”‚
โ”‚ 1035 โ”‚ โ”‚ โ”‚
โ”‚ 1036 โ”‚ โ”‚ log.debug(f"{self.class.name}: preparing data") โ”‚
โ”‚ โฑ 1037 โ”‚ โ”‚ self._data_connector.prepare_data() โ”‚
โ”‚ 1038 โ”‚ โ”‚ โ”‚
โ”‚ 1039 โ”‚ โ”‚ call._call_setup_hook(self) # allow user to set up LightningModule in accelerat โ”‚
โ”‚ 1040 โ”‚ โ”‚ log.debug(f"{self.class.name}: configuring model") โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\connectors\data_connector.py:95 in prepare_data โ”‚
โ”‚ โ”‚
โ”‚ 92 โ”‚ โ”‚ โ”‚ prepare_data_per_node = datamodule.prepare_data_per_node โ”‚
โ”‚ 93 โ”‚ โ”‚ โ”‚ with InfiniteBarrier(): โ”‚
โ”‚ 94 โ”‚ โ”‚ โ”‚ โ”‚ if (prepare_data_per_node and local_rank_zero) or (not prepare_data_per
โ”‚
โ”‚ โฑ 95 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ call._call_lightning_datamodule_hook(trainer, "prepare_data") โ”‚
โ”‚ 96 โ”‚ โ”‚ โ”‚
โ”‚ 97 โ”‚ โ”‚ # handle lightning module prepare data: โ”‚
โ”‚ 98 โ”‚ โ”‚ if lightning_module is not None and is_overridden("prepare_data", lightning_modu โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\call.py:199 in _call_lightning_datamodule_hook โ”‚
โ”‚ โ”‚
โ”‚ 196 โ”‚ fn = getattr(trainer.datamodule, hook_name) โ”‚
โ”‚ 197 โ”‚ if callable(fn): โ”‚
โ”‚ 198 โ”‚ โ”‚ with trainer.profiler.profile(f"[LightningDataModule]{trainer.datamodule.__class โ”‚
โ”‚ โฑ 199 โ”‚ โ”‚ โ”‚ return fn(*args, **kwargs) โ”‚
โ”‚ 200 โ”‚ return None โ”‚
โ”‚ 201 โ”‚
โ”‚ 202 โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\data\datamodule โ”‚
โ”‚ s\image\mvtecad.py:219 in prepare_data โ”‚
โ”‚ โ”‚
โ”‚ 216 โ”‚ โ”‚ if (self.root / self.category).is_dir(): โ”‚
โ”‚ 217 โ”‚ โ”‚ โ”‚ logger.info("Found the dataset.") โ”‚
โ”‚ 218 โ”‚ โ”‚ else: โ”‚
โ”‚ โฑ 219 โ”‚ โ”‚ โ”‚ download_and_extract(self.root, DOWNLOAD_INFO) โ”‚
โ”‚ 220 โ”‚
โ”‚ 221 โ”‚
โ”‚ 222 @deprecate(since="2.1.0", remove="2.3.0", use="MVTecAD") โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\data\utils\down โ”‚
โ”‚ load.py:313 in download_and_extract โ”‚
โ”‚ โ”‚
โ”‚ 310 โ”‚ โ”‚ if info.url.startswith("http://") or info.url.startswith("https://"): โ”‚
โ”‚ 311 โ”‚ โ”‚ โ”‚ with DownloadProgressBar(unit="B", unit_scale=True, miniters=1, desc=info.na โ”‚
โ”‚ 312 โ”‚ โ”‚ โ”‚ โ”‚ # nosemgrep: python.lang.security.audit.dynamic-urllib-use-detected.dyna โ”‚
โ”‚ โฑ 313 โ”‚ โ”‚ โ”‚ โ”‚ urlretrieve( # noqa: S310 # nosec B310 โ”‚
โ”‚ 314 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ url=f"{info.url}", โ”‚
โ”‚ 315 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ filename=downloaded_file_path, โ”‚
โ”‚ 316 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ reporthook=progress_bar.update_to, โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:241 in urlretrieve โ”‚
โ”‚ โ”‚
โ”‚ 238 โ”‚ """ โ”‚
โ”‚ 239 โ”‚ url_type, path = _splittype(url) โ”‚
โ”‚ 240 โ”‚ โ”‚
โ”‚ โฑ 241 โ”‚ with contextlib.closing(urlopen(url, data)) as fp: โ”‚
โ”‚ 242 โ”‚ โ”‚ headers = fp.info() โ”‚
โ”‚ 243 โ”‚ โ”‚ โ”‚
โ”‚ 244 โ”‚ โ”‚ # Just return the local path and the "headers" for file:// โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:216 in urlopen โ”‚
โ”‚ โ”‚
โ”‚ 213 โ”‚ โ”‚ _opener = opener = build_opener() โ”‚
โ”‚ 214 โ”‚ else: โ”‚
โ”‚ 215 โ”‚ โ”‚ opener = _opener โ”‚
โ”‚ โฑ 216 โ”‚ return opener.open(url, data, timeout) โ”‚
โ”‚ 217 โ”‚
โ”‚ 218 def install_opener(opener): โ”‚
โ”‚ 219 โ”‚ global _opener โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:525 in open โ”‚
โ”‚ โ”‚
โ”‚ 522 โ”‚ โ”‚ meth_name = protocol+"_response" โ”‚
โ”‚ 523 โ”‚ โ”‚ for processor in self.process_response.get(protocol, []): โ”‚
โ”‚ 524 โ”‚ โ”‚ โ”‚ meth = getattr(processor, meth_name) โ”‚
โ”‚ โฑ 525 โ”‚ โ”‚ โ”‚ response = meth(req, response) โ”‚
โ”‚ 526 โ”‚ โ”‚ โ”‚
โ”‚ 527 โ”‚ โ”‚ return response โ”‚
โ”‚ 528 โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:634 in http_response โ”‚
โ”‚ โ”‚
โ”‚ 631 โ”‚ โ”‚ # According to RFC 2616, "2xx" code indicates that the client's โ”‚
โ”‚ 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 โ”‚ โ”‚ โ”‚
โ”‚ 637 โ”‚ โ”‚ return response โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:563 in error โ”‚
โ”‚ โ”‚
โ”‚ 560 โ”‚ โ”‚ โ”‚
โ”‚ 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 โ”‚
โ”‚ 566 # sense to skip a superclass in favor of a subclass and when it might โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:496 in _call_chain โ”‚
โ”‚ โ”‚
โ”‚ 493 โ”‚ โ”‚ handlers = chain.get(kind, ()) โ”‚
โ”‚ 494 โ”‚ โ”‚ for handler in handlers: โ”‚
โ”‚ 495 โ”‚ โ”‚ โ”‚ func = getattr(handler, meth_name) โ”‚
โ”‚ โฑ 496 โ”‚ โ”‚ โ”‚ result = func(*args) โ”‚
โ”‚ 497 โ”‚ โ”‚ โ”‚ if result is not None: โ”‚
โ”‚ 498 โ”‚ โ”‚ โ”‚ โ”‚ return result โ”‚
โ”‚ 499 โ”‚
โ”‚ โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:643 in โ”‚
โ”‚ http_error_default โ”‚
โ”‚ โ”‚
โ”‚ 640 โ”‚
โ”‚ 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): โ”‚
โ”‚ 646 โ”‚ # maximum number of redirections to any single URL โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
HTTPError: HTTP Error 404: Not Found

Dataset

MVTecAD

Model

N/A

Steps to reproduce the behavior

Install anomalib using pip install anomalib.
run command "anomalib train --model Patchcore --data anomalib.data.MVTecAD"
or the equivalent python code.

OS information

OS information:

  • OS: Windows 10 22h2 x64
  • Python version: 3.11.4
  • Anomalib version: up to date to this date

Expected behavior

download the dataset and work

Screenshots

No response

Pip/GitHub

pip

What version/branch did you use?

not sure, the one that is default

Configuration YAML

I don't know where to config it.

Logs

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ in _run_module_as_main:198                                                                       โ”‚
โ”‚ in _run_code:88                                                                                  โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ in <module>:7                                                                                    โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   4 from anomalib.cli.cli import main                                                            โ”‚
โ”‚   5 if __name__ == '__main__':                                                                   โ”‚
โ”‚   6 โ”‚   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         โ”‚
โ”‚ โฑ 7 โ”‚   sys.exit(main())                                                                         โ”‚
โ”‚   8                                                                                              โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\cli\cli.py:492  โ”‚
โ”‚ in main                                                                                          โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   489 def main() -> None:                                                                        โ”‚
โ”‚   490 โ”‚   """Trainer via Anomalib CLI."""                                                        โ”‚
โ”‚   491 โ”‚   configure_logger()                                                                     โ”‚
โ”‚ โฑ 492 โ”‚   AnomalibCLI()                                                                          โ”‚
โ”‚   493                                                                                            โ”‚
โ”‚   494                                                                                            โ”‚
โ”‚   495 if __name__ == "__main__":                                                                 โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\cli\cli.py:83   โ”‚
โ”‚ in __init__                                                                                      โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    80 โ”‚   โ”‚   โ”‚   self.before_instantiate_classes()                                              โ”‚
โ”‚    81 โ”‚   โ”‚   โ”‚   self.instantiate_classes()                                                     โ”‚
โ”‚    82 โ”‚   โ”‚   if run:                                                                            โ”‚
โ”‚ โฑ  83 โ”‚   โ”‚   โ”‚   self._run_subcommand()                                                         โ”‚
โ”‚    84 โ”‚                                                                                          โ”‚
โ”‚    85 โ”‚   @staticmethod                                                                          โ”‚
โ”‚    86 โ”‚   def init_parser(**kwargs) -> ArgumentParser:                                           โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\cli\cli.py:370  โ”‚
โ”‚ in _run_subcommand                                                                               โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   367 โ”‚   โ”‚   elif self.config["subcommand"] in {*self.subcommands(), "train", "export", "pred   โ”‚
โ”‚   368 โ”‚   โ”‚   โ”‚   fn = getattr(self.engine, self.subcommand)                                     โ”‚
โ”‚   369 โ”‚   โ”‚   โ”‚   fn_kwargs = self._prepare_subcommand_kwargs(self.subcommand)                   โ”‚
โ”‚ โฑ 370 โ”‚   โ”‚   โ”‚   fn(**fn_kwargs)                                                                โ”‚
โ”‚   371 โ”‚   โ”‚   elif PIPELINE_REGISTRY is not None and self.subcommand in pipeline_subcommands()   โ”‚
โ”‚   372 โ”‚   โ”‚   โ”‚   run_pipeline(self.config)                                                      โ”‚
โ”‚   373 โ”‚   โ”‚   else:                                                                              โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\engine\engine.p โ”‚
โ”‚ y:719 in train                                                                                   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   716 โ”‚   โ”‚   โ”‚   # if the model is zero-shot or few-shot, we only need to run validate for no   โ”‚
โ”‚   717 โ”‚   โ”‚   โ”‚   self.trainer.validate(model, val_dataloaders, None, verbose=False, datamodul   โ”‚
โ”‚   718 โ”‚   โ”‚   else:                                                                              โ”‚
โ”‚ โฑ 719 โ”‚   โ”‚   โ”‚   self.trainer.fit(model, train_dataloaders, val_dataloaders, datamodule, ckpt   โ”‚
โ”‚   720 โ”‚   โ”‚   return self.trainer.test(model, test_dataloaders, ckpt_path=ckpt_path, datamodul   โ”‚
โ”‚   721 โ”‚                                                                                          โ”‚
โ”‚   722 โ”‚   def export(                                                                            โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\trainer.py:584 in fit                                                                          โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    581 โ”‚   โ”‚   self.state.status = TrainerStatus.RUNNING                                         โ”‚
โ”‚    582 โ”‚   โ”‚   self.training = True                                                              โ”‚
โ”‚    583 โ”‚   โ”‚   self.should_stop = False                                                          โ”‚
โ”‚ โฑ  584 โ”‚   โ”‚   call._call_and_handle_interrupt(                                                  โ”‚
โ”‚    585 โ”‚   โ”‚   โ”‚   self,                                                                         โ”‚
โ”‚    586 โ”‚   โ”‚   โ”‚   self._fit_impl,                                                               โ”‚
โ”‚    587 โ”‚   โ”‚   โ”‚   model,                                                                        โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\call.py:49 in _call_and_handle_interrupt                                                       โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    46 โ”‚   try:                                                                                   โ”‚
โ”‚    47 โ”‚   โ”‚   if trainer.strategy.launcher is not None:                                          โ”‚
โ”‚    48 โ”‚   โ”‚   โ”‚   return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer,    โ”‚
โ”‚ โฑ  49 โ”‚   โ”‚   return trainer_fn(*args, **kwargs)                                                 โ”‚
โ”‚    50 โ”‚                                                                                          โ”‚
โ”‚    51 โ”‚   except _TunerExitException:                                                            โ”‚
โ”‚    52 โ”‚   โ”‚   _call_teardown_hook(trainer)                                                       โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\trainer.py:630 in _fit_impl                                                                    โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    627 โ”‚   โ”‚   โ”‚   model_provided=True,                                                          โ”‚
โ”‚    628 โ”‚   โ”‚   โ”‚   model_connected=self.lightning_module is not None,                            โ”‚
โ”‚    629 โ”‚   โ”‚   )                                                                                 โ”‚
โ”‚ โฑ  630 โ”‚   โ”‚   self._run(model, ckpt_path=ckpt_path, weights_only=weights_only)                  โ”‚
โ”‚    631 โ”‚   โ”‚                                                                                     โ”‚
โ”‚    632 โ”‚   โ”‚   assert self.state.stopped                                                         โ”‚
โ”‚    633 โ”‚   โ”‚   self.training = False                                                             โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\trainer.py:1037 in _run                                                                        โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   1034 โ”‚   โ”‚   self.__setup_profiler()                                                           โ”‚
โ”‚   1035 โ”‚   โ”‚                                                                                     โ”‚
โ”‚   1036 โ”‚   โ”‚   log.debug(f"{self.__class__.__name__}: preparing data")                           โ”‚
โ”‚ โฑ 1037 โ”‚   โ”‚   self._data_connector.prepare_data()                                               โ”‚
โ”‚   1038 โ”‚   โ”‚                                                                                     โ”‚
โ”‚   1039 โ”‚   โ”‚   call._call_setup_hook(self)  # allow user to set up LightningModule in accelerat  โ”‚
โ”‚   1040 โ”‚   โ”‚   log.debug(f"{self.__class__.__name__}: configuring model")                        โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\connectors\data_connector.py:95 in prepare_data                                                โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    92 โ”‚   โ”‚   โ”‚   prepare_data_per_node = datamodule.prepare_data_per_node                       โ”‚
โ”‚    93 โ”‚   โ”‚   โ”‚   with _InfiniteBarrier():                                                       โ”‚
โ”‚    94 โ”‚   โ”‚   โ”‚   โ”‚   if (prepare_data_per_node and local_rank_zero) or (not prepare_data_per_   โ”‚
โ”‚ โฑ  95 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   call._call_lightning_datamodule_hook(trainer, "prepare_data")          โ”‚
โ”‚    96 โ”‚   โ”‚                                                                                      โ”‚
โ”‚    97 โ”‚   โ”‚   # handle lightning module prepare data:                                            โ”‚
โ”‚    98 โ”‚   โ”‚   if lightning_module is not None and is_overridden("prepare_data", lightning_modu   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\lightning\pytorch\traine โ”‚
โ”‚ r\call.py:199 in _call_lightning_datamodule_hook                                                 โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   196 โ”‚   fn = getattr(trainer.datamodule, hook_name)                                            โ”‚
โ”‚   197 โ”‚   if callable(fn):                                                                       โ”‚
โ”‚   198 โ”‚   โ”‚   with trainer.profiler.profile(f"[LightningDataModule]{trainer.datamodule.__class   โ”‚
โ”‚ โฑ 199 โ”‚   โ”‚   โ”‚   return fn(*args, **kwargs)                                                     โ”‚
โ”‚   200 โ”‚   return None                                                                            โ”‚
โ”‚   201                                                                                            โ”‚
โ”‚   202                                                                                            โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\data\datamodule โ”‚
โ”‚ s\image\mvtecad.py:219 in prepare_data                                                           โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   216 โ”‚   โ”‚   if (self.root / self.category).is_dir():                                           โ”‚
โ”‚   217 โ”‚   โ”‚   โ”‚   logger.info("Found the dataset.")                                              โ”‚
โ”‚   218 โ”‚   โ”‚   else:                                                                              โ”‚
โ”‚ โฑ 219 โ”‚   โ”‚   โ”‚   download_and_extract(self.root, DOWNLOAD_INFO)                                 โ”‚
โ”‚   220                                                                                            โ”‚
โ”‚   221                                                                                            โ”‚
โ”‚   222 @deprecate(since="2.1.0", remove="2.3.0", use="MVTecAD")                                   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\anomalib\data\utils\down โ”‚
โ”‚ load.py:313 in download_and_extract                                                              โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   310 โ”‚   โ”‚   if info.url.startswith("http://") or info.url.startswith("https://"):              โ”‚
โ”‚   311 โ”‚   โ”‚   โ”‚   with DownloadProgressBar(unit="B", unit_scale=True, miniters=1, desc=info.na   โ”‚
โ”‚   312 โ”‚   โ”‚   โ”‚   โ”‚   # nosemgrep: python.lang.security.audit.dynamic-urllib-use-detected.dyna   โ”‚
โ”‚ โฑ 313 โ”‚   โ”‚   โ”‚   โ”‚   urlretrieve(  # noqa: S310  # nosec B310                                   โ”‚
โ”‚   314 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   url=f"{info.url}",                                                     โ”‚
โ”‚   315 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   filename=downloaded_file_path,                                         โ”‚
โ”‚   316 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   reporthook=progress_bar.update_to,                                     โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:241 in urlretrieve   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    238 โ”‚   """                                                                                   โ”‚
โ”‚    239 โ”‚   url_type, path = _splittype(url)                                                      โ”‚
โ”‚    240 โ”‚                                                                                         โ”‚
โ”‚ โฑ  241 โ”‚   with contextlib.closing(urlopen(url, data)) as fp:                                    โ”‚
โ”‚    242 โ”‚   โ”‚   headers = fp.info()                                                               โ”‚
โ”‚    243 โ”‚   โ”‚                                                                                     โ”‚
โ”‚    244 โ”‚   โ”‚   # Just return the local path and the "headers" for file://                        โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:216 in urlopen       โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    213 โ”‚   โ”‚   _opener = opener = build_opener()                                                 โ”‚
โ”‚    214 โ”‚   else:                                                                                 โ”‚
โ”‚    215 โ”‚   โ”‚   opener = _opener                                                                  โ”‚
โ”‚ โฑ  216 โ”‚   return opener.open(url, data, timeout)                                                โ”‚
โ”‚    217                                                                                           โ”‚
โ”‚    218 def install_opener(opener):                                                               โ”‚
โ”‚    219 โ”‚   global _opener                                                                        โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:525 in open          โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    522 โ”‚   โ”‚   meth_name = protocol+"_response"                                                  โ”‚
โ”‚    523 โ”‚   โ”‚   for processor in self.process_response.get(protocol, []):                         โ”‚
โ”‚    524 โ”‚   โ”‚   โ”‚   meth = getattr(processor, meth_name)                                          โ”‚
โ”‚ โฑ  525 โ”‚   โ”‚   โ”‚   response = meth(req, response)                                                โ”‚
โ”‚    526 โ”‚   โ”‚                                                                                     โ”‚
โ”‚    527 โ”‚   โ”‚   return response                                                                   โ”‚
โ”‚    528                                                                                           โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:634 in http_response โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    631 โ”‚   โ”‚   # According to RFC 2616, "2xx" code indicates that the client's                   โ”‚
โ”‚    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 โ”‚   โ”‚                                                                                     โ”‚
โ”‚    637 โ”‚   โ”‚   return response                                                                   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:563 in error         โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    560 โ”‚   โ”‚                                                                                     โ”‚
โ”‚    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                     โ”‚
โ”‚    566 # sense to skip a superclass in favor of a subclass and when it might                     โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:496 in _call_chain   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    493 โ”‚   โ”‚   handlers = chain.get(kind, ())                                                    โ”‚
โ”‚    494 โ”‚   โ”‚   for handler in handlers:                                                          โ”‚
โ”‚    495 โ”‚   โ”‚   โ”‚   func = getattr(handler, meth_name)                                            โ”‚
โ”‚ โฑ  496 โ”‚   โ”‚   โ”‚   result = func(*args)                                                          โ”‚
โ”‚    497 โ”‚   โ”‚   โ”‚   if result is not None:                                                        โ”‚
โ”‚    498 โ”‚   โ”‚   โ”‚   โ”‚   return result                                                             โ”‚
โ”‚    499                                                                                           โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:643 in               โ”‚
โ”‚ http_error_default                                                                               โ”‚
โ”‚                                                                                                  โ”‚
โ”‚    640                                                                                           โ”‚
โ”‚    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):                                                   โ”‚
โ”‚    646 โ”‚   # maximum number of redirections to any single URL                                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
HTTPError: HTTP Error 404: Not Found

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. changed the title [-]๐Ÿž <title>[/-] [+]๐Ÿž HTTP 404[/+] on Jan 7, 2026
  2. github-actions commented on Jan 7, 2026

    @github-actions

    Thanks for submitting this issue! It has been added to our triage queue. A maintainer will review it shortly.

  3. rajeshgangireddy commented on Jan 7, 2026

    @rajeshgangireddy
    Contributor

    Hi, recently the MVTECAd dataset URL has changed.
    This was fixed in #3138 and is merged to main already. We are yet to make a release with the fix.

    You can either :
    a) install anomalib from the main branch
    or
    b) download the dataset file from https://www.mydrive.ch/shares/38536/3830184030e49fe74747669442f0f283/download/420938113-1629960298/mvtec_anomaly_detection.tar.xz
    manually to the datasets directory.

    Edit : to install anomalib from main, simplest solution is to do pip install git+https://github.com/open-edge-platform/anomalib.git
    or uv pip install git+https://github.com/open-edge-platform/anomalib.git if you are using uv

  4. marta00x commented on Jan 7, 2026

    @marta00x
    Author

    Hi,
    installing it via the git worked and now it is downloading correctly.
    Thank you very much for help!

  5. locked and limited conversation to collaborators on Jan 7, 2026
  6. converted this issue into a discussion #3246 on Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions