Skip to content

Redirect file not found: "C:/Users/m.khan2/OneDrive" #421

@StormsHalted

Description

@StormsHalted

Hello NREL,

I make a very simple code to convert opendss into Gridlab-d:

Note: I do not have a coordinates file for this model.

`from ditto.readers.opendss.read import Reader
from ditto.store import Store
from ditto.writers.gridlabd.write import Writer

model = Store()

dss_reader = Reader(master_file='C:/Users/m.khan2/OneDrive - Washington State University (email.wsu.edu)/UI-Assist/AvistaF7 - 2.dss'.format(model=model))

dss_reader.parse(model)`

I get this error:
C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\python.exe C:\Users\m.khan2\PycharmProjects\DSStoGLD\DSStoGLD.py Traceback (most recent call last): File "C:\Users\m.khan2\PycharmProjects\DSStoGLD\DSStoGLD.py", line 9, in <module> dss_reader.parse(model) File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\ditto\readers\opendss\read.py", line 245, in parse self.parse_power_source( File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\ditto\readers\opendss\read.py", line 52, in timed result = method(*args, **kw) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\ditto\readers\opendss\read.py", line 344, in parse_power_source sources = _dss_class_to_dict("Vsource") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\ditto\readers\opendss\read.py", line 2765, in _dss_class_to_dict return dss.utils.class_to_dataframe(class_name).to_dict(orient="index") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\opendssdirect\utils.py", line 123, in class_to_dataframe dss.Circuit.SetActiveClass("{class_name}".format(class_name=class_name)) File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\opendssdirect\Circuit.py", line 98, in SetActiveClass return CheckForError(lib.Circuit_SetActiveClass(ClassName)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\m.khan2\AppData\Local\Programs\Python\Python311\Lib\site-packages\dss\_cffi_api_util.py", line 145, in _check_for_error raise DSSException(error_num, self._get_string(self._lib.Error_Get_Description())) dss._cffi_api_util.DSSException: (#243) Redirect file not found: "C:/Users/m.khan2/OneDrive"

My redirects are arranged as follows in the opendss model and all of them are in the same folder:

`Redirect Feeder.dss

Redirect Microgrid.dss

Redirect LoadShapes.dss

Redirect PV-Insertions.dss ! **** File contains all PV - insertions as Generators

! Redirect PV-Insertions-PV.dss ! **** File contains all PV - insertions as PVs

Redirect ProfileAssignement.dss`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions