Skip to content

SDF file not loading in scenario analysis #1621

@san5602

Description

@san5602

Updating AB

  • Yes, I have updated AB and still experience this issue

What happened?

Hi I generated the prospective database using Premise scenario link for different IAM, coinvent -3.10-cutoff remind, image etc. In past it was all working fine. However since yesterday I'm not able to load SDF file. These are freshly downloaded databases. I tried using excel, instead of csv, in that case it ask me to link biosphere and fails halfway through. The projects that are old, the files seems to be working properly. The issue seems to be there only for new projects I'm generating.

Relevant errors

Scenario difference file exported to C:/Users/sansh/Desktop\SDF ecoinvent ecoinvent-3.10-cutoff - remind - SSP1-Base.csv

Writing superstructure database...
Writing activities to SQLite3 database:
0% [##############################] 100% | ETA: 00:00:00
Total time elapsed: 00:01:05
Title: Writing activities to SQLite3 database:
  Started: 01/07/2026 10:00:01
  Finished: 01/07/2026 10:01:07
  Total time elapsed: 00:01:05
  CPU %: 99.80
  Memory %: 3.66
Created database: ecoinvent-3.10-cutoff - remind - SSP1-Base
10:29:23 | INFO | Loading Scenario file. This may take a while for large files
10:29:28 | ERROR | SyntaxError: invalid syntax (<unknown>, line 0)
Traceback (most recent call last):
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\activity_browser\bwutils\superstructure\utils.py", line 81, in wrapper
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\activity_browser\layouts\tabs\LCA_setup.py", line 605, in load_action
    df = ABCSVImporter.read_file(path, separator=separator)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\activity_browser\bwutils\superstructure\file_imports.py", line 223, in read_file
    df = pd.read_csv(
         ^^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\pandas\io\parsers\readers.py", line 1026, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\pandas\io\parsers\readers.py", line 626, in _read
    return parser.read(nrows)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\pandas\io\parsers\readers.py", line 1923, in read
    ) = self._engine.read(  # type: ignore[attr-defined]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 234, in read
    chunks = self._reader.read_low_memory(nrows)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pandas/_libs/parsers.pyx", line 838, in pandas._libs.parsers.TextReader.read_low_memory
  File "pandas/_libs/parsers.pyx", line 921, in pandas._libs.parsers.TextReader._read_rows
  File "pandas/_libs/parsers.pyx", line 1045, in pandas._libs.parsers.TextReader._convert_column_data
  File "pandas/_libs/parsers.pyx", line 2116, in pandas._libs.parsers._apply_converter
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\ast.py", line 64, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sansh\AppData\Local\anaconda3\envs\ab\Lib\ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 0

SyntaxError: invalid syntax

Operating system

Windows 11

Conda environment

Using: ab-plugin-scenari~ romainsacchi/noarch::ab-plugin-scenariolink-0.1.6-py_0 in Activity Browser version: 2.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions