Problem in installation of openWNS

Asked by Jenny Jin

I tried to install the openWNS just following the openWNS users guide. After the download of it I got some warnings during installation.

I use Ubuntu 10.04 und python 2.6.5.

jin@tkrn-desktop:~/myOpenWNS$ sudo ./playground.py install --warnings
Executing: scons dbg --warn=no-missing-sconscript -j 2 default
scons: Reading SConscript files ...
-I/usr/include/python2.6 -I/usr/include/python2.6
-lpthread -ldl -lutil -lm -lpython2.6

scons: warning: The env.SourceSignatures() method is deprecated;
 convert your build to use the env.Decider() method instead.
File "/home/jin/myOpenWNS/SConstruct", line 74, in <module>

scons: warning: The env.TargetSignatures() method is deprecated;
 convert your build to use the env.Decider() method instead.
File "/home/jin/myOpenWNS/SConstruct", line 75, in <module>

scons: warning: The Options class is deprecated; use the Variables class instead.
File "/home/jin/myOpenWNS/SConstruct", line 127, in <module>

scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.
File "/home/jin/myOpenWNS/SConstruct", line 128, in <module>

scons: warning: The PathOption() function is deprecated; use the PathVariable() function instead.
File "/home/jin/myOpenWNS/SConstruct", line 129, in <module>

scons: warning: The PackageOption() function is deprecated; use the PackageVariable() function instead.
File "/home/jin/myOpenWNS/SConstruct", line 135, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>

scons: warning: BuildDir() and the build_dir keyword have been deprecated;
 use VariantDir() and the variant_dir keyword instead.
File "/home/jin/myOpenWNS/SConstruct", line 297, in <module>
scons: done reading SConscript files.

scons: warning: Support for pre-2.7.0 Python version (2.6.5) is deprecated.
    If this will cause hardship, contact <email address hidden>.
File "/usr/local/bin/scons", line 192, in <module>
scons: Building targets ...
scons: `dbg' is up to date.
scons: `default' is up to date.
scons: done building targets.

Please help! THX!

Question information

Language:
English Edit question
Status:
Solved
For:
IMTAphy Edit question
Assignee:
No assignee Edit question
Solved by:
Jenny Jin
Solved:
Last query:
Last reply:
Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#1

Dear Jenny,

openWNS was originally developed under Python2.5 and Ubuntu 8.04. Originally we tried to keep it working with many Linux distributions and even Windows. This was too much work, so we gave it up. Even with every new Ubuntu version it takes us a lot of time to get the simulator running again. This means we fix the errors. After that we unfortunately did not have the time to fix all warning, since some of them require strong restructuring of the code.

The warnings do not effect you simulator installation. You can proceed with the installation and user guide and test you installation. The test will immediately tell you if everything is all right with the simulator and results are as expected.

After adjusting openWNS to work with Ubuntu 12.10 and 13.4 we will hopefully find some more time to clean up more warnings.

Regards,

Maciej

Revision history for this message
Jenny Jin (jessiefaye320) said :
#2

Hi Maciej,

Thank you for answering me so soon!
Actually I have done the rest of installation, such as Wrowser, PostgreSQL database. Then I ran the tests:
$ ./playground.py runtests
got other 2 warnings:
TestSuite: /home/jin/myOpenWNS/tests/sytem/tcp-tests
Reason: Currently no applications available

TestSuite: /home/jin/myOpenWNS/tests/sytem/wimac-tests/configBypass
Reason: Problem with multiple CIDs for QoS

'cause they are just about test files so I ignored these two and prepared a campaign for wifimac experiment1. After I copied two files into the simulation directory, I ran:
jin@tkrn-desktop:~/myFirstCampaign/experiment1$ sudo ./simcontrol.py --create-database
Traceback (most recent call last):
  File "./campaignConfiguration.py", line 45, in <module>
    params = Set()
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/simdb/Parameters.py", line 148, in __call__
    self.cursor.execute('SELECT DISTINCT parameter_name, parameter_type FROM parameters WHERE campaign_id = %d' % self.conf.campaignId)
AttributeError: 'Configuration' object has no attribute 'campaignId'

When I started Wrowser, I just got error...
So now I am confused, if it is ok with SCons, is it possible that there is something wrong with database?

Regards,

Jenny

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#3

Hi,

never saw this error before. Could you please provide the error message you get when trying to start Wrowser. Could you please also provide the information from the file ~/.wns/dbAccess.conf

Regards,

Mac

Revision history for this message
Jenny Jin (jessiefaye320) said :
#4

Hi Mac,

here is the error message:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/Windows.py", line 154, in on_actionPreferences_triggered
    preferencesDialogue.readFromConfig(filename, owner)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/Dialogues.py", line 65, in readFromConfig
    c.writeDbAccessConf(filename, owner)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/Configuration.py", line 192, in writeDbAccessConf
    config = file(dbAccessConfFile, 'w')
IOError: [Errno 13] Permission denied: '/home/jin/.wns/dbAccess.conf'

then if I try to create a simulation campaign, I got an error about psycopg2:
jin@tkrn-desktop:~/myOpenWNS$ sudo ./playground.py preparecampaign ../myFirstCampaign
Preparing simulation campaign. Please wait...
Please enter the name of the directory the simulations shall be stored in [simulations]: exp1
Please enter a name for the campaign [myFirstCampaign_exp1]: exp1
Please enter a short description of the campaign [../myFirstCampaign/exp1]: mts
Traceback (most recent call last):
  File "./playground.py", line 103, in <module>
    core.run()
  File "/home/jin/myOpenWNS/wnsbase/playground/Core.py", line 199, in run
    self.command.run()
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/__init__.py", line 171, in run
    PrepareCampaign.createNewSubCampaign(directory)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/PrepareCampaign.py", line 109, in createNewSubCampaign
    cursor.execute('INSERT INTO campaigns (title, description) VALUES (\'%s\', \'%s\')' % (campaignTitle, campaignDescription))
psycopg2.IntegrityError: null value in column "id" violates not-null constraint

The last one is ~/.wns/dbAccess.conf :
# Keep this file private. Do NOT change file access permissions. Security hazard!

[DB]
host = localhost
name = simdb

[User]
password = foobar
name = postgres

Thanks!

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#5

Hi,

I see two problems: For some reason the file ~/.wns/dbAccess.conf cannot be accessed. Lets just fix this the hard way by typing "chmod 0666 ~/.wns./dbAccess.conf". The other problem is, that you have created your openWNS database as database superuser "postgres". I do not know which side effects this might have. I would suggest you remove the database and then create it again. Follow the instructions starting at step 3:

http://docs.openwns.org/gettingStarted/postgresql.html

before typing "CREATE DATABASE simdb;" type "DROP DATABASE simdb;" to remove the old one. Follow the next steps very carefully. Especially do not forget to type "exit" where it says so, because that is what assures you switch from "postgres" user back to normal user, which must be done before running "./createUser.py".

Then delete the old campaign and create a new one using "./playground.py preparecampaign"

Revision history for this message
Jenny Jin (jessiefaye320) said :
#6

Hi Mac,

Thank you for the advices!

I did follow what you wrote and also the instructions. And I found out that if I write:
jin@tkrn-desktop:~/wrowser$ sudo wrowser
The error about dbAccess.conf would be avoided.

But there is still an error occured when I create a new campaign:
psycopg2.IntegrityError: null value in column "id" violates not-null constraint

Following is what I just did with each step:

1, to change the permission of dbAcess.conf
jin@tkrn-desktop:~$ sudo chmod 0666 ~/.wns/dbAccess.conf

2, to remove old fatabase and create a new one
jin@tkrn-desktop:~$ sudo su postgres
postgres@tkrn-desktop:/home/jin$ psql
Password:
psql (8.4.17)
Type "help" for help.

postgres=# DROP DATABASE simdb;
DROP DATABASE
postgres=# CREATE DATABASE simdb;
CREATE DATABASE
postgres=# \q
postgres@tkrn-desktop:/home/jin$ exit
exit

jin@tkrn-desktop:~$ cd wrowser/openwns/wrowser/simdb/sql
jin@tkrn-desktop:~/wrowser/openwns/wrowser/simdb/sql$ psql -U postgres -d simdb -f setupSimDB.sql
(......)
CONTEXT: SQL statement in PL/PgSQL function "create_user" near line 1565
CREATE FUNCTION
CREATE FUNCTION
ALTER FUNCTION
CREATE TRIGGER
jin@tkrn-desktop:~/wrowser/openwns/wrowser/simdb/scripts$
jin@tkrn-desktop:~/wrowser/openwns/wrowser/simdb/scripts$ ./createUser.py
Local installation of wrowser found.
Prepending /home/jin/wrowser to sys.path
Please enter the password of the 'postgres' super user:
User successfully created.
jin@tkrn-desktop:~/wrowser/openwns/wrowser/simdb/scripts$ cd ~
jin@tkrn-desktop:~$ cd wrowser
jin@tkrn-desktop:~/wrowser$ wrowser
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/Windows.py", line 156, in on_actionPreferences_triggered
    preferencesDialogue.writeToConfig(filename, owner)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/Dialogues.py", line 98, in writeToConfig
    c.writeDbAccessConf(filename, owner)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/Configuration.py", line 196, in writeDbAccessConf
    os.chown(dbAccessConfFile, pwd.getpwnam(owner)[2], pwd.getpwnam(owner)[3])
OSError: [Errno 1] Operation not permitted: '/home/jin/.wns/dbAccess.conf'

BUT
jin@tkrn-desktop:~/wrowser$ sudo wrowser
avoid the error

jin@tkrn-desktop:~$ sudo rm -rf ~/myFirstCampaign ~/TestCampaign
jin@tkrn-desktop:~$ cd myOpenWNS
jin@tkrn-desktop:~/myOpenWNS$ sudo ./playground.py runtests
(......)
Ran 35266 tests in 1661.905s

OK
Warning: You had 2 suites disabled.

         TestSuite: /home/jin/myOpenWNS/tests/system/tcp-tests
         Reason: Currently no applications available

         TestSuite: /home/jin/myOpenWNS/tests/system/wimac-tests/configBypass
         Reason: Problem with multiple CIDs for QoS.

3, to create a new campaign
jin@tkrn-desktop:~/myOpenWNS$ sudo ./playground.py preparecampaign ../myFirstCampaign
[sudo] password for jin:
Preparing simulation campaign. Please wait...
Please enter the name of the directory the simulations shall be stored in [simulations]: exp1
Please enter a name for the campaign [myFirstCampaign_exp1]: exp1
Please enter a short description of the campaign [../myFirstCampaign/exp1]: mte
Traceback (most recent call last):
  File "./playground.py", line 103, in <module>
    core.run()
  File "/home/jin/myOpenWNS/wnsbase/playground/Core.py", line 199, in run
    self.command.run()
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/__init__.py", line 171, in run
    PrepareCampaign.createNewSubCampaign(directory)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/PrepareCampaign.py", line 109, in createNewSubCampaign
    cursor.execute('INSERT INTO campaigns (title, description) VALUES (\'%s\', \'%s\')' % (campaignTitle, campaignDescription))
psycopg2.IntegrityError: null value in column "id" violates not-null constraint

I doubt about if I install the psycopg2 wrong but couldn't figure it out... :-/
Please help me out!

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#7

Hi,

so the strange think here is that for some reason you do not seam to have sufficient user rights on your own home directory "/home/jin". You might want to just create a new user "jin2" with a clean home directory and get a clean openWNS copy for that user:

bzr branch http://launchpad.net/~comnets/openwns-sdk/sdk--main--1.0 myOpenWNS
cd myOpenWNS
./playground.py upgrade --noAsk
cd ~

Also get a copy of Wrowser, but just to get the createUser db script

bzr branch lp:openwns-wrowser wrowser

Then create a database for that user:

cd wrowser/openwns/wrowser/simdb/scripts/
psql -U postgres -d simdb -f setupSimDB.sql

The password should be "foobar"

You should now delete the downloaded wrowser directory, just to make sure nothing goes wrong due to multiple wrowsers in the system:

cd ~
rm -rf wrowser

Now try creating a campaign:
cd myOpenWNS
./playground.py preparecampaign ~/myCampaign

Revision history for this message
Jenny Jin (jessiefaye320) said :
#8

Hi,

After creating a new campaign
jin9@tkrn-desktop:~/myOpenWNS$ sudo ./playground.py preparecampaign ../myFirstCampaign
I got the same error...
Traceback (most recent call last):
  File "./playground.py", line 103, in <module>
    core.run()
  File "/home/jin9/myOpenWNS/wnsbase/playground/Core.py", line 199, in run
    self.command.run()
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/__init__.py", line 151, in run
    PrepareCampaign.createNewSubCampaign(directory, self.options.createSubCampaign)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/PrepareCampaign.py", line 109, in createNewSubCampaign
    cursor.execute('INSERT INTO campaigns (title, description) VALUES (\'%s\', \'%s\')' % (campaignTitle, campaignDescription))
psycopg2.IntegrityError: null value in column "id" violates not-null constraint

PS, I did everything under the new user "jin9" and did delete wrowser directory.
Thx!

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#9

Please try everything without typing "sudo"

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#10

Let's also have a look at your database. Please type:

psql -U jin9 -d simdb

password is "foobar"

Type "\d" and press enter to see the DB structure (please post it here)

also please type in and post the result:

SELECT * FROM campaigns;
SELECT * FROM scenarios;

Revision history for this message
Jenny Jin (jessiefaye320) said :
#11

                        List of relations
 Schema | Name | Type | Owner
--------+-------------------------------+----------+---------------
 jin9 | authorizations | table | administrator
 jin9 | batch_means | table | administrator
 jin9 | batch_means_histograms | table | administrator
 jin9 | batch_means_histograms_id_seq | sequence | administrator
 jin9 | batch_means_id_seq | sequence | administrator
 jin9 | campaigns | table | administrator
 jin9 | dlre_histograms | table | administrator
 jin9 | dlre_histograms_id_seq | sequence | administrator
 jin9 | dlres | table | administrator
 jin9 | dlres_id_seq | sequence | administrator
 jin9 | files | table | administrator
 jin9 | files_id_seq | sequence | administrator
 jin9 | jobs | table | administrator
 jin9 | jobs_id_seq | sequence | administrator
 jin9 | log_eval_entries | table | administrator
 jin9 | log_eval_entries_id_seq | sequence | administrator
 jin9 | log_evals | table | administrator
 jin9 | log_evals_id_seq | sequence | administrator
 jin9 | lre_histograms | table | administrator
 jin9 | lre_histograms_id_seq | sequence | administrator
 jin9 | lres | table | administrator
 jin9 | lres_id_seq | sequence | administrator
 jin9 | moments | table | administrator
 jin9 | moments_id_seq | sequence | administrator
 jin9 | parameters | table | administrator
 jin9 | parameters_id_seq | sequence | administrator
 jin9 | pd_fs | table | administrator
 jin9 | pd_fs_id_seq | sequence | administrator
 jin9 | pdf_histograms | table | administrator
 jin9 | pdf_histograms_id_seq | sequence | administrator
 jin9 | probes | table | administrator
 jin9 | probes_id_seq | sequence | administrator
 jin9 | scenarios | table | administrator
 jin9 | scenarios_id_seq | sequence | administrator
 jin9 | table_rows | table | administrator
 jin9 | table_rows_id_seq | sequence | administrator
 jin9 | tables | table | administrator
 jin9 | tables_id_seq | sequence | administrator
 jin9 | users | view | administrator
(39 rows)

Revision history for this message
Jenny Jin (jessiefaye320) said :
#12

jin9@tkrn-desktop:~$ sudo su postgres
postgres@tkrn-desktop:/home/jin9$ psql -U jin9 -d simdb
Password for user jin9:
psql (8.4.17)
Type "help" for help.

simdb=> SELECT * FROM campaigns;
 id | user_id | title | description | db_size
----+---------+-------+-------------+---------
(0 rows)

simdb=> SELECT * FROM scenarios;
 id | campaign_id | current_job_id | state | max_sim_time | current_sim_time | sim_time_last_write
----+-------------+----------------+-------+--------------+------------------+---------------------
(0 rows)

I need some time to try not to use "sudo ". The result I will post later.

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#13

Could you please provide your PostgreSQL Version: "psql --version"

Revision history for this message
Jenny Jin (jessiefaye320) said :
#14

Hi,

psql (PostgreSQL) 8.4.17

Also today I reinstalled the operating system and openwns by using "sudo" as little as possible.
At last I got the same error again...
Traceback (most recent call last):
  File "./playground.py", line 103, in <module>
    core.run()
  File "/home/jin7/myOpenWNS/wnsbase/playground/Core.py", line 199, in run
    self.command.run()
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/__init__.py", line 171, in run
    PrepareCampaign.createNewSubCampaign(directory)
  File "/usr/local/lib/python2.6/dist-packages/openwns/wrowser/playgroundPlugins/SimulationCampaign/PrepareCampaign.py", line 109, in createNewSubCampaign
    cursor.execute('INSERT INTO campaigns (title, description) VALUES (\'%s\', \'%s\')' % (campaignTitle, campaignDescription))
psycopg2.IntegrityError: null value in column "id" violates not-null constraint

PS, I asked some else about the PostgreSQL that they also installed the same version as I did.

Thank you for your patient and effort!

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#15

Hi,

last time I tried installing an openWNS system on Ubuntu 10.04 I experienced problems with PostgreSQL. But actually it completely refused to start the database and the installation was completely messed up. As far as I remember I could only solve it by installing a different PostgreSQL version.

Since Ubuntu 10.04 is no longer supported, potential bugs and instabilities with PostgreSQL will not be fixed in that version.

I was able to to prepare openWNS for current Ubuntu LTS version 12.04. The documentation http://docs.openwns.org/ has been adjusted accordingly. I would suggest you try it on Ubuntu 12.04. If possible, I would use a new clean installation. At least please assure to completely remove your PostgreSQL installation on your current system:

apt-get --purge remove postgresql\*
rm -rf /etc/postgresql/
rm -rf /etc/postgresql-common
rm -rf /var/lib/postgresql
userdel -r postgres
groupdel postgres

You might want to press F5 (reload) when following the installation guidelines for openWNS. The "Prerequisites" and "Installing the PostgreSQL database" now include specific information for Ubuntu 12.04.

Unfortunately the amount of warning messages in openWNS has heavily increased now.

Revision history for this message
Jenny Jin (jessiefaye320) said :
#16

Hi Mac,

Thank you for your advice!

I will try to install Ubuntu 12.04.

If I would have problem about that, I will ask you with a new question. So I close this one now as solved problem.

Regards,

Jenny