timcera / wdmtoolbox

Command line script and Python package to work with Hydrological Simulation Programs-FORTRAN (HSPF) Watershed Data Management (WDM) files.
Other
10 stars 6 forks source link

Wrong version of toolbox-utils installed #25

Closed abrasher closed 2 years ago

abrasher commented 2 years ago

Hi

I believe running pip install wdmtoolbox installs the wrong version of toolbox-utils

It installs 1.0.0 and causes an error when it is imported. This does not happen with 0.1.2

I fixed this but manually installing toolbox-utils==0.1.2

Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

===== RESTART: C:\Users\xxx\xxx\Desktop\hspf\main.py =====
Traceback (most recent call last):
  File "C:\Users\xxx\xxx\Desktop\hspf\main.py", line 6, in <module>
    from wdmtoolbox import wdmtoolbox
  File "C:\Users\dlee\AppData\Local\Programs\Python\Python310\lib\site-packages\wdmtoolbox\wdmtoolbox.py", line 18, in <module>
    from tstoolbox import tsutils
  File "C:\Users\dlee\AppData\Local\Programs\Python\Python310\lib\site-packages\tstoolbox\__init__.py", line 4, in <module>
    from .tstoolbox import *
  File "C:\Users\dlee\AppData\Local\Programs\Python\Python310\lib\site-packages\tstoolbox\tstoolbox.py", line 58, in <module>
    from .functions.calculate_fdc import calculate_fdc
  File "C:\Users\dlee\AppData\Local\Programs\Python\Python310\lib\site-packages\tstoolbox\functions\calculate_fdc.py", line 173, in <module>
    ci: tsutils.FloatBetweenZeroAndOne = 0.9,
AttributeError: module 'toolbox_utils.tsutils' has no attribute 'FloatBetweenZeroAndOne'
timcera commented 2 years ago

Apologies. I meant to get all my toolboxes updated over the weekend to use "toolbox_utils>1.0.0", but didn't finish. Hopefully wdmtoolbox will be updated today then you should be able to run "pip install --upgrade wdmtoolbox" and everything should work. Thank you for the report and I will update this issue when fixed...

timcera commented 2 years ago

Just released version 13.0.0 of wdmtoolbox which installs the correct version of toolbox_utils. If you use any of my other toolbox, they have to upgraded also.