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

error running financial_functions.py #40

Open
YoumnaAtta opened this issue Jul 22, 2024 · 4 comments
Open

error running financial_functions.py #40

YoumnaAtta opened this issue Jul 22, 2024 · 4 comments

Comments

@YoumnaAtta
Copy link

I am running into this error in financial_functions.py in
loan.TaxCreditIncentives.itc_fed_percent = agent.loc['itc_fraction_of_capex'] * 100
TypeError: error converting tuple to array: argument must be iterable

Screenshot 2024-07-22 at 10 30 04 AM Screenshot 2024-07-22 at 10 30 18 AM Screenshot 2024-07-22 at 10 30 26 AM
@YoumnaAtta YoumnaAtta changed the title error in financial_functions.py error running financial_functions.py Jul 22, 2024
@sfk1107
Copy link

sfk1107 commented Oct 8, 2024

I am also encountering this error - just curious if you have found a patch. Thank you

@michaelavs
Copy link
Collaborator

Hi @sfk1107,
I believe this is a quirk with PySAM, but it is is fairly simple fix. You can update the line in financial functions to be:

loan.TaxCreditIncentives.itc_fed_percent = [agent.loc['itc_fraction_of_capex'] * 100]

Which will make the singular value be read as a list (iterable) instead. Let me know if that gives you any issue once implemented and I can take a second look

@sfk1107
Copy link

sfk1107 commented Oct 9, 2024 via email

@yifang-zhu-pge
Copy link

I encountered this issue as well. Given that it affects so many people, we should do a pull request to fix it.

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

No branches or pull requests

4 participants