GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG] maturity and existing filters raise an AttributeError · Issue #662 · EnergySystemsModellingLab/MUSE_OS

[BUG] maturity and existing filters raise an AttributeError #662

New issue
Copy link
New issue
Copy link
Open
Open
[BUG] maturity and existing filters raise an AttributeError#662
Copy link
Assignees
tsmbland
Labels
bugSomething isn't working

Description

@jamshid-y
jamshid-y
opened on Feb 17, 2025
Issue body actions

Describe the bug

In MUSE 1.3.2 and 1.3.3, I get the following error when using the maturity and existing filters:

-- 2025-02-17 18:43:50 - muse.filters - INFO
Computing filter: maturity

Traceback (most recent call last):
  File "", line 198, in _run_module_as_main
  File "", line 88, in _run_code
  File "...\.venv\Scripts\muse.exe\__main__.py", line 7, in 
    sys.exit(run())
             ~~~^^
  File "...\.venv\Lib\site-packages\muse\__main__.py", line 64, in run
    muse_main(args.settings, args.model, args.copy)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\muse\__main__.py", line 59, in muse_main
    MCA.factory(settings).run()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "...\.venv\Lib\site-packages\muse\mca.py", line 295, in run
    _, new_market, self.sectors = self.find_equilibrium(new_market)
                                  ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\muse\mca.py", line 198, in find_equilibrium
    return find_equilibrium(
        market=market,
    ...<6 lines>...
        equilibrium=self.equilibrium,
    )
  File "...\.venv\Lib\site-packages\muse\mca.py", line 444, in find_equilibrium
    market, equilibrium_sectors = single_year_iteration(market, sectors)
                                  ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\muse\mca.py", line 361, in single_year_iteration
    sector_market = sector.next(
        market[["supply", "consumption", "prices"]]  # type:ignore
    )
  File "...\.venv\Lib\site-packages\muse\sectors\sector.py", line 220, in next
    subsector.invest(
    ~~~~~~~~~~~~~~~~^
        technologies=self.technologies.sel(year=investment_year),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        market=market,
        ^^^^^^^^^^^^^^
    )
    ^
  File "...\.venv\Lib\site-packages\muse\sectors\subsector.py", line 71, in invest
    self.aggregate_lp(technologies, market)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\muse\sectors\subsector.py", line 103, in aggregate_lp
    agent.next(technologies=technologies, market=market, demand=share)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\muse\agents\agent.py", line 340, in next
    self.search_rules(self, demand, technologies, market).fillna(0).astype(int)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\muse\filters.py", line 230, in filters
    result = function(agent, result, *args, **kwargs)
  File "...\.venv\Lib\site-packages\muse\registration.py", line 176, in decorated
    result = inner_decorated(*args, **kwargs)
  File "...\.venv\Lib\site-packages\muse\filters.py", line 139, in decorated
    result = function(agent, search_space, *args, **kwargs)  # type: ignore
  File "...\.venv\Lib\site-packages\muse\filters.py", line 341, in maturity
    capacity = agent.filter_input(market.capacity, year=agent.year)
                                  ^^^^^^^^^^^^^^^
  File "...\.venv\Lib\site-packages\xarray\core\common.py", line 302, in __getattr__
    raise AttributeError(
        f"{type(self).__name__!r} object has no attribute {name!r}"
    )
AttributeError: 'Dataset' object has no attribute 'capacity'

To Reproduce

Edit Agents.csv in the default or default_retro folders with a dedicated SearchRule.

Note

These filters work in MUSE 1.3.1

Activity

  1. jamshid-y
    added
    bugSomething isn't working
    on Feb 17, 2025
  2. github-project-automation
    added this to MUSEon Feb 17, 2025
  3. github-project-automation
    moved this to 📋 Backlog in MUSEon Feb 17, 2025
  4. tsmbland
    moved this from 📋 Backlog to 🔖 Ready in MUSEon Mar 10, 2025
  5. tsmbland
    self-assigned this
    on Mar 24, 2025
  6. tsmbland
    moved this from 🔖 Ready to On hold in MUSEon Mar 27, 2025
  7. tsmbland
    moved this from On hold to 🔖 Ready in MUSEon Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tsmbland
    tsmbland

Labels

bugSomething isn't working

Type

No type

Projects

  • MUSE
    Status
    🔖 Ready
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.