lasa01 / Plumber

A Blender addon for importing Source 1 engine maps, models, materials and textures. This addon makes it possible to import full CS:GO, TF2, CS:S or other Source 1 game maps into Blender.
MIT License
395 stars 29 forks source link

File is not VPK (invaild magic) #98

Closed umustbeloggedintododat closed 2 years ago

umustbeloggedintododat commented 2 years ago

Describe the bug I wanted to import the maps from GMod, the first time it worked, most of the materials were missing so I mounted all the VPKs, but now it won't import anymore. I wanted to import gm_construct btw. Why is this happening?

To Reproduce Steps to reproduce the behavior:

  1. Import a gm_construct
  2. Set option vpks to all the GMOD vpks
  3. See error

Expected behavior A clear and concise description of what you expected to happen. The model gm_construct to appear

Related files Upload an example of files that cause the issue [e.g. de_mirage_d.vmf].

Logs

Python: Traceback (most recent call last):
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\__init__.py", line 718, in execute
    fs = self.get_filesystem(context)
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\__init__.py", line 475, in get_filesystem
    return game_def.get_indexed_filesystem()
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\__init__.py", line 270, in get_indexed_filesystem
    fs_dict[self.name] = VMFFileSystem(data_dirs, data_paks, index_files=True)
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vmfpy\fs.py", line 82, in __init__
    self.index_all()
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vmfpy\fs.py", line 150, in index_all
    self._do_index(self.iter_all())
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vmfpy\fs.py", line 124, in _do_index
    for path, info in index_iter:
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vmfpy\fs.py", line 121, in iter_all
    yield from self.iter_paks()
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vmfpy\fs.py", line 117, in iter_paks
    yield from self.iter_pak(pak_file)
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vmfpy\fs.py", line 110, in iter_pak
    pak = vpk.open(pak_file)
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vpk\__init__.py", line 16, in open
    return VPK(*args, **kwargs)
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vpk\__init__.py", line 207, in __init__
    self.read_header()
  File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_import_vmf\deps\vpk\__init__.py", line 309, in read_header
    raise ValueError("File is not VPK (invalid magic)")
ValueError: File is not VPK (invalid magic)

location: <unknown location>:-1

You can open the console with Window -> Toggle System Console on Windows.

Screenshots If applicable, add screenshots to help explain your problem. image ion): Details (please complete the following informat

Additional context Add any other context about the problem here.

umustbeloggedintododat commented 2 years ago

NVM i got it fixed, I mounted the wrong VPKs