MinhHaDuong / VN-Power-Scenario

A recursive model of electricity production in Vietnam
Other
0 stars 2 forks source link

Solving "summarize" issue #22

Open alice-dub opened 6 years ago

alice-dub commented 6 years ago

When I ran the main script with the "summarize" arguments two issues occured:

https://github.com/MinhHaDuong/VN-Power-Scenario/commit/98479b9475d62f632aebbd80c3b29b50ed5a2ffe

MinhHaDuong commented 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

alice-dub commented 6 years ago

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'
MinhHaDuong commented 6 years ago

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 !

alice-dub commented 6 years ago

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.

MinhHaDuong commented 6 years ago

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