Skip to content

fix: fix country_converter logging in build_population_layouts#1757

Merged
lkstrp merged 1 commit intoPyPSA:masterfrom
tgilon:fix/coco-logging
Jul 24, 2025
Merged

fix: fix country_converter logging in build_population_layouts#1757
lkstrp merged 1 commit intoPyPSA:masterfrom
tgilon:fix/coco-logging

Conversation

@tgilon
Copy link
Copy Markdown
Collaborator

@tgilon tgilon commented Jul 15, 2025

Closes # (if applicable).

Changes proposed in this Pull Request

This PR suggests a solution to an error that will occur in future versions of country_converter, starting from version 1.3.1. The current fixed version is 1.2.

Fixed error


 Traceback (most recent call last):
  File "/home/runner/work/pypsa-eur/pypsa-eur/.snakemake/scripts/tmpffufgtvg.build_population_layouts.py", line 36, in <module>
    coco.logging.getLogger().setLevel(coco.logging.CRITICAL)
    ^^^^^^^^^^^^
AttributeError: module 'country_converter' has no attribute 'logging'

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

@coroa
Copy link
Copy Markdown
Member

coroa commented Jul 24, 2025

Hey, this is hitting us too in a second project.

What is the merge policy?

If it is approved once, the PR creator is free to merge? Or is it that you, @fneum and @lkstrp are the ones clicking the merge button in the end (or different list of people).

Unless there is an objection, i'll merge this non-controversial change tomorrow noon to get it out the door (broke with recent country_converter update).

@lkstrp
Copy link
Copy Markdown
Member

lkstrp commented Jul 24, 2025

Ah wow, I was just chasing the same thing.

It's a bit of a do-ocracy. For those smaller trivial changes, once approved merge whenever you want. We just don't merge immediately if you still need to make small updates. But here we could have just clicked it

@lkstrp lkstrp merged commit 4ebaeef into PyPSA:master Jul 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants