Skip to content

No such file or directory: ds1-common.emedf.json when installed as pip dependency #32

@JacobHearst

Description

@JacobHearst

Overview

Hi there, I was hoping to import this project as a pip dependency but when I try and load the DS1 game params, I get the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\jhear\\Documents\\dev\\ptde\\soulsearch\\venv\\Lib\\site-packages\\soulstruct\\darksouls1ptde\\events\\emevd\\ds1-common.emedf.json'

What confuses me about this is that I can plainly see the file exists in this repo. It's right here. When I look on my machine at the path in the error message I can see that there is in fact NO file at that path so clearly it got lost somewhere along the way.

I'm not super familiar with the specifics of how pip installs packages (or if that's even a use case you had intended to support) so apologies if I'm asking a silly question but is there a reason that file wouldn't get copied over during dependency installation?

Environment

  • Windows 10
  • Python 3.13.3
  • soulstruct@1676a0dc3129b82cdecba1b083e305413d22d985

Steps to Reproduce

  1. Create a new directory
  2. python -m venv venv
  3. .\venv\Scripts\Activate.ps1
  4. pip install git+https://github.com/Grimrukh/soulstruct.git
  5. Run the following script
from soulstruct.config import PTDE_PATH
from soulstruct.darksouls1ptde.params.gameparambnd import GameParamBND

try:
    game_params = GameParamBND(f"{PTDE_PATH}/param/GameParam/GameParam.parambnd")
    print("Successfully loaded GameParamBND!")
    print(f"PTDE Path: {PTDE_PATH}")
except Exception as e:
    print(f"Error: {str(e)}")

Expected Result

Game params are loaded

Actual Result

$ python .\test_soulstruct.py
WARNING ┃ soulstruct.dcx.oodle ┃  271 ┃ Could not find `oo2core_6_win64.dll` in Soulstruct, Sekiro, or Elden Ring paths.
You will not be able to compress/decompress Sekiro or Elden Ring files using Soulstruct.
Call `oodle.LOAD_DLL(path)` to load the DLL from an arbitrary path.
WARNING ┃ soulstruct.dcx.oodle ┃  366 ┃ Could not find/load Oodle DLL. DCX_KRAK compression/decompression will be unavailable. Error: Could not find `oo2core_6_win64.dll` in Soulstruct, Sekiro, or Elden Ring paths.
CRITICAL ┃ soulstruct.logging_utils ┃  171 ┃ Unhandled exception:
Traceback (most recent call last):
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\test_soulstruct.py", line 2, in <module>
    from soulstruct.darksouls1ptde.params.gameparambnd import GameParamBND
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\darksouls1ptde\__init__.py", line 2, in <module>
    from . import events
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\darksouls1ptde\events\__init__.py", line 86, in <module>
    from .emevd import EMEVD, decompiler
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\darksouls1ptde\events\emevd\__init__.py", line 1, in <module>
    from .core import EMEVD
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\darksouls1ptde\events\emevd\core.py", line 13, in <module>
    from .decompiler import DECOMPILER, OPT_ARGS_DECOMPILER, decompile_instruction
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\darksouls1ptde\events\emevd\decompiler.py", line 19, in <module>
    from .emedf import EMEDF
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\darksouls1ptde\events\emevd\emedf.py", line 3461, in <module>
    add_common_emedf_info(EMEDF, SOULSTRUCT_PATH("darksouls1ptde/events/emevd/ds1-common.emedf.json"))
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\base\events\emevd\emedf.py", line 120, in add_common_emedf_info
    common_emedf_raw = read_json(common_emedf_path)
  File "C:\Users\jhear\Documents\dev\ptde\soulsearch\venv\Lib\site-packages\soulstruct\utilities\files.py", line 142, in read_json
    return json.loads(Path(json_path).read_text(encoding=encoding))
                      ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jhear\AppData\Local\Programs\Python\Python313\Lib\pathlib\_local.py", line 546, in read_text
    return PathBase.read_text(self, encoding, errors, newline)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jhear\AppData\Local\Programs\Python\Python313\Lib\pathlib\_abc.py", line 632, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f:
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jhear\AppData\Local\Programs\Python\Python313\Lib\pathlib\_local.py", line 537, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\jhear\\Documents\\dev\\ptde\\soulsearch\\venv\\Lib\\site-packages\\soulstruct\\darksouls1ptde\\events\\emevd\\ds1-common.emedf.json'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions