Open alice-dub opened 6 years ago
Thanks for opening the ticket. I am a bit confused by the title and by what "the main script" means, but that's normal. The first thing that someone does when reading a bug reports is to try to reproduce the bug. So please include the exact command in the bug report. Here are other tips:
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines http://www.softwaretestinghelp.com/how-to-write-good-bug-report/ https://musescore.org/en/developers-handbook/how-write-good-bug-report-step-step-instructions
Sorry for the imprecision:
I run the Run.py script with "summarize" argument (python Run.py "summarize"
)
The first error raised is :
File "Run.py", line 56, in pv
return present_value(variable, parameter.discount_rate).sum()
AttributeError: 'float' object has no attribute 'sum'
The second error raised is:
File "Run.py", line 145, in total
d["Power produced"] = [(self.total_production * GWh / TWh).round(), "Twh"]
AttributeError: 'float' object has no attribute 'round'
Je pense pas que les quotes autour de summarize sont nécessaires.
python3 Run.py summarize
fonctionne chez moi.
Est-ce que l'erreur est capturée par make test
?
Il faut que toutes les bugs identifiés soient reproductibles et capturés par le test, afin de s'assurer qu'ils ne reviennent pas !
Bonjour,
Quelles versions de librairies utilisez vous ? Les bugs détaillés dans l'issue apparaissent lorsque j'utilise la dernière version du package Anaconda. En installant les librairies directement avec pip, votre version marche, ce qui m'amène en penser que c'est un problème amené par une vieille version de librairie (pandas?) utilisée par Anaconda.
Dispensez vous des formules de politesses.
Répondez à la question avant d'en poser une autre svp
Normalement c'est à celui qui ouvre le bug de lister ses versions. Pandas 19.2.5 Numpy 1.12.1 SALib 1.1.2 statsmodels 0.8.0 pytest_regtest 0.15.1
When I ran the main script with the "summarize" arguments two issues occured:
the script could not apply the pv function to external_cost because it was a float and not a serie (I changed the definition of the external cost, from self_emission and not self_emission[Total] (line 108)
line 145, total_production is a float and not a serie, I had to change the round method to a round function.
https://github.com/MinhHaDuong/VN-Power-Scenario/commit/98479b9475d62f632aebbd80c3b29b50ed5a2ffe