Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not iterable: look-up in demand_from_timeline is wrong #106

Open
muelleram opened this issue Jan 28, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@muelleram
Copy link
Collaborator

For temporal markets, tlca.lci(expand_technosphere = False) - which is the from_timeline approach - cannot retrieve the demand from the timeline (get_demand_from_timeline), as it looks up the pair (id_background_producer, original_db) in the interdatabase_activity_mapping. For temporal markets, this original_db is "dynamic", so not the string of the originally linked background db, but the string we gave to the foreground system. The interdatabase_activity_mapping, however, only stores mapping between processes in the background dbs, so not with the database label "dynamic".

Image

IMO, this should be changed to self.demand_dependent_background_database_names, so the string of the originally linked background database.

@muelleram muelleram added the bug Something isn't working label Jan 28, 2025
muelleram added a commit that referenced this issue Jan 28, 2025
@muelleram
Copy link
Collaborator Author

I added a fix, but not sure if fully correct.
The tlca.dynamic_scores are different between using tlca.lci(expand_technosphere=True) and tlca.lci(expand_technosphere=False)

let's dicuss :)

@jakobsarthur
Copy link
Collaborator

Yes I came accros this tonight on the train as well. Seems that this must have popped up when it was moved from the initial stage building of th esetlist to after the timeline. So easiest fix would probably be looking in the commit history to see the change there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants