Closed kilomwork closed 7 years ago
Hi @kilomyau, there is a widget for these types of variables in the master branch and it will be included in the 1.1 release. For the time being you will have to enter the values using a file. The attached file array_layout_example.xlsx gives an example of how the input should be formatted.
Best wishes,
Mat
Hi @H0R5E,
I have tried to input the Mean Power Production Histogram Per Device data by the attached excel file.
However, the following error occurred. Could you suggest how I can fix it please? Thank you very much for your help.
2017-07-16 00:20:14,289 - CRITICAL - dtocean_gui.main - A RuntimeError occurred: Reading variable farm.mean_power_hist_per_device led to the following traceback:
Traceback (most recent call last): File "D:\DTOcean\lib\site-packages\aneris\control\data.py", line 446, in _get_data_obj data = data_structure.get_data(raw, metadata) File "D:\DTOcean\lib\site-packages\dtocean_core\data\definitions.py", line 1307, in get_data for k, v in raw.items()} AttributeError: 'tuple' object has no attribute 'items'
2017-07-16 00:20:14,292 - CRITICAL - dtocean_gui.main - File "D:\DTOcean\lib\site-packages\dtocean_gui\main.py", line 765, in read_file str(interface_name)) File "D:\DTOcean\lib\site-packages\dtocean_core\pipeline.py", line 987, in read_file overwrite) File "D:\DTOcean\lib\site-packages\dtocean_core\pipeline.py", line 956, in read log_exceptions) File "D:\DTOcean\lib\site-packages\dtocean_core\pipeline.py", line 1262, in _read_variables log_exceptions=log_exceptions) File "D:\DTOcean\lib\site-packages\dtocean_core\core.py", line 911, in add_datastate log_exceptions=log_exceptions) File "D:\DTOcean\lib\site-packages\aneris\control\simulation.py", line 672, in add_datastate metadata) File "D:\DTOcean\lib\site-packages\aneris\control\data.py", line 299, in create_new_data data_obj = self._get_data_obj(metadata, raw_data) File "D:\DTOcean\lib\site-packages\aneris\control\data.py", line 455, in _get_data_obj raise RuntimeError(errStr)
Hi @kilomyau, I'm afraid direct loading of this variable is broken in version 1.0. It's fixed in version 1.1 but in the meantime you can use the "Load test data..." menu option when you right click on "Electrical Sub Systems" in the pipeline to load it up using a python file. I've attached an example of the file you need and a screenshot of the menu I am referring to.
Hi @H0R5E, Thanks a lot for your help!
The python code you provided works well. However, it created another error that you may be able to help. Sorry for seeking lots of assistance here as I am experienced in python language.
2017-07-18 23:39:28,457 - INFO - aneris.control.simulation - Datastate with level "electrical sub systems start" stored
2017-07-18 23:39:31,292 - CRITICAL - dtocean_gui.main - A TypeError occurred: ("'in
Hi, version 1.0 of the electrical module can only work with the following soil types: 'hard glacial till', 'hard rock', 'gravel cobble'. This is fixed in version 1.1.
Hi @H0R5E ,
I have tried changing the soil type to 'hard rock' for tables beta.bathymetry_layer, beta.cable_corridor_bathymetry_layer, beta.project_bathymetry_layer and beta.project_cable_corridor_bathymetry_layer in the pgAdmin.
However, the same error happens again. Could you suggest any tables that I have missed to update please? Thank you very much for your help.
Hi, sorry about that! Does the example data run?
Hi @H0R5E
I installed DTOcean in my second laptop.
I checked the data stored in the pgAdmin and I found that the example data came with the installation package works well with 'medium sand'.
So, I guess that there may be other issues causing the error instead of the soil type?
Thank you!
Yes, on second thought medium sand may be the only soil type that will pass this bug. You will have to change all the soil types to medium sand.
Sorry for the confusion, I thought that the first if statement would skip the other conditions of it was true, but this is not the case.
On 20 Jul 2017 12:54 p.m., "Ka Man" notifications@github.com wrote:
Hi @H0R5E https://github.com/h0r5e
I installed DTOcean in my second laptop.
I checked the data stored in the pgAdmin and I found that the example data came with the installation package works well with 'medium sand'.
So, I guess that there may be other issues causing the error instead of the soil type?
Thank you!
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/DTOcean/dtocean-issues/issues/21#issuecomment-316668777, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2lFwPRimzKx-EwXSXRJ150gffZWT8Aks5sPzH3gaJpZM4OT-4N .
Hi @H0R5E,
I have just set the soil type back to 'medium sand' for tables beta.bathymetry_layer, beta.cable_corridor_bathymetry_layer, beta.project_bathymetry_layer and beta.project_cable_corridor_bathymetry_layer using the code as follow
Unfortunately, the error still occurs.
As the error message said that it is caused by 'Nonetype', I would expect that it is related to some empty records?? However, I am searching through the above four tables and I have not found any empty records yet.
Thank you.
When I am running the Electrical Sub Systems module without inputs from the Hydrodynamics module, I want to input Array Layout and Mean Power Production Histogram Per Device data through editing the table instead of uploading an excel file. I expect that I can edit the table in a similar way as the lease boundary input as shown in Figure 1. However, it seems that the table function has been locked as shown in Figure 2.
Figure 1
Figure 2