DTOcean / dtocean

Design and techno-economic assessment of marine renewable energy arrays
https://dtocean.github.io
GNU General Public License v3.0
4 stars 6 forks source link

An IntegrityError occurred: duplicate key value violates unique constraint #24

Closed fcorreiadafonseca closed 6 years ago

fcorreiadafonseca commented 6 years ago

Hello everyone, I have been trying to get the DTOcean tool to work. First I couldn't install DTOcean since I was getting the error related with the installation directory when installing the Hydrodynamics package.

Once having introduced the directory in the regedit, I managed to install the tool and run it. However, whenever I press the initiate dataflow icon and pressing ok after the "PASSED" prompt message, the progress bar starts to load but stays loading indefinitely.

I did not have a python installation prior to installing DTOcean. I have succesfully installled the database by following the tutorial (pgadmin III). However, I am stuck on this point.

Any thoughts? Thank you in advance, Francisco

H0R5E commented 6 years ago

Hi Francisco,

Which simulation are you trying to run? How long were you waiting?

You can find log files in the "YourUserDirectory\AppData\Roaming\DTOcean\dtocean_app\logs" folder. The latest one should be called dtocean_app.log. Is there any relevant information towards the end of that file?

fcorreiadafonseca commented 6 years ago

Hello @H0R5E, Thank you for your fast reply. I was following the available tutorials (Tutorial 1 #3 Input preparation) for the simple example with Hydro+Electrical. I don't seem to have the "dtocean_app" folder in the "YourUserDirectory\AppData\Roaming\DTOcean\" directory, so I couldn't find the log files.

Anyway, I have let the progress bar load for roughly 30 minutes and ended up getting the following error: dtocean_snap Not sure of what might be happening. Thank you in advance! Francisco

H0R5E commented 6 years ago

Sorry, the folder will be "dtocean_gui" on the version you are running.

Looks like some sort of database corruption caused by a duplicate key. Which version of postgreSQL are you using? DTOcean was only tested on 9.3 and 9.4. Did you change any data in the database? Could you have restored it twice?

In general, there are lots of problems with the release you are trying to use. Some of those problems are resolved in the latest anaconda version (1.0.3) -> see here for instructions <- which I recommend you upgrade to if you want to continue. There will also be a new major release (including an installer) before the end of the year, which will be much more stable, so you might want to wait for that.

I've not seen this issue before, so if you want to continue investigating I would be interested to know why it's happening.

H0R5E commented 6 years ago

Francisco, do you get this issue when you select a device before initiating the dataflow? I notice the device isn't set on the screenshot you added.

fcorreiadafonseca commented 6 years ago

Hello @H0R5E , I am running postgreSQL version 9.3.23. It doesn't change anything if I select the device but I might have restored the database twice, now that you mention it. How can I see if that is indeed the problem? I will try to look into it, thanks. Francisco

H0R5E commented 6 years ago

Hi Francisco, you should try deleting the database and then recreating it from scratch. This is the only way to start afresh.

fcorreiadafonseca commented 6 years ago

Hello @H0R5E, thank you for the tip. Everything seems to be working now! I will look into the next anaconda version as well. Thanks! Francisco

H0R5E commented 6 years ago

Hi Francisco, glad you have it sorted and thanks for your feedback.

As I said, there are still a number of problems, even with version 1.0.3, which will be fixed in the next update.