-
Notifications
You must be signed in to change notification settings - Fork 19
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
AttributeError: 'SwmmExtract' object has no attribute 'TypeCheck' #15
Comments
@melissagqc can you share what your config.json file looks like? Did you define the correct output file name? |
Yes, the output file name is correct. |
Sorry did not mean to close this issue |
@melissagqc I think your issue is that you don't have anything defined for "nodes" in the json file, it is just an empty list. You need to list one or more nodes that you want to extract results for: Given those nodes, OSTRICH-SWMM will generate "swmm_nodes.csv", where the columns are the attributes under "statistics" and each row contains the values for each node in the "nodes" list. |
@melissagqc In addition to editing your json file, it looks like this is an error coming from a newer version of swmmtoolbox. Please see the commit referenced above for a temporary fix. I plan to update all the packages to be Python 3 compatible soon. |
(ostrich) C:\Git\pub\ostrich-swmm>ostrich-swmm run
OSTRICH input for subcat S1##PP1_1 had too many lid units, changing to max number 41
OSTRICH input for subcat S2##RB1_2 had too many lid units, changing to max number 65
OSTRICH input for subcat S2##PP1_2 had too many lid units, changing to max number 10
OSTRICH input for subcat S3##PP1_3 had too many lid units, changing to max number 70
... EPA-SWMM 5.1 (Build 5.1.13)
o Retrieving project data
o Simulation complete
... EPA-SWMM completed in 0.00 seconds.
Traceback (most recent call last):
File "C:\Users\gqc\Envs\ostrich\Scripts\ostrich-swmm-script.py", line 11, in
load_entry_point('ostrich-swmm==0.6.0', 'console_scripts', 'ostrich-swmm')()
File "build\bdist.win-amd64\egg\ostrich_swmm_main_.py", line 247, in main
File "build\bdist.win-amd64\egg\ostrich_swmm_main_.py", line 116, in run_cmd
File "build\bdist.win-amd64\egg\ostrich_swmm\run.py", line 43, in perform_run
File "build\bdist.win-amd64\egg\ostrich_swmm\extract.py", line 332, in perform_extraction_steps
File "build\bdist.win-amd64\egg\ostrich_swmm\extract.py", line 43, in perform_node_extraction
AttributeError: 'SwmmExtract' object has no attribute 'TypeCheck'
Args:
binary_output (swmmtoolbox.SwmmExtract): The output to extract from.
node_output_file (file): The file to output extracted data to.
node_names (Iterable): A list of node names to extract data for.
statistics (Iterable): A list of statistics to extract.
event_threshold_flow_rate (Number): The flow rate above which a node
is considered to have flow. Defaults to 0.
"""
# Get the indicies of the relevant data in the binary output.
node_type = binary_output.TypeCheck('node')
node_total_inflow_variable_index = next(
index
for index, name
in binary_output.varcode[node_type].items()
if name == 'Total_inflow'
)
The text was updated successfully, but these errors were encountered: