Error in installing the PostgreSQL database

Asked by Hendrik on 2009-06-18

Hi everybody,
the installation process worked out pretty well by now, but stops when installing the PostgreSQL database or rather when executing the ./createUser.py...

An error occurs saying:

----------------------------------------------------------------------
Traceback (most recent call last):
  File "./createUser.py", line 50, in <module>
    fullName = pwd.getpwnam(userName)[4]
NameError: name 'userName' is not defined
--------------------------------------------------------------------

I did not declare a username by now, should I and when yes, where?

Thanks for your help in advance!
Hendrik

Question information

Language:
English Edit question
Status:
Solved
For:
openWNS-Application Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel Bültmann
Solved:
2009-06-19
Last query:
2009-06-19
Last reply:
2009-06-19

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Hendrik,

it seems that you have discovered a bug. The error you see is that
Python complains that the variable userName is not defined. I had a look
at the source code (Wrowser/bin/createUser.py, that is the one you
executed, right?) and there is no such variable defined at this point.
It seems that line 56 must be moved upwards.

Would you be so kind to file a bug report on this one? I will then solve
this.

Regards,
  Daniel

Hendrik wrote:
> New question #74606 on openWNS-Application:
> https://answers.launchpad.net/openwns-application/+question/74606
>
> Hi everybody,
> the installation process worked out pretty well by now, but stops when installing the PostgreSQL database or rather when executing the ./createUser.py...
>
> An error occurs saying:
>
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./createUser.py", line 50, in <module>
> fullName = pwd.getpwnam(userName)[4]
> NameError: name 'userName' is not defined
> --------------------------------------------------------------------
>
> I did not declare a username by now, should I and when yes, where?
>
> Thanks for your help in advance!
> Hendrik
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko7Nk4ACgkQf9Vu/ReRkeCmrwCfdvw+dMANRUGAovi0RDCm551h
sYMAniANx8i0KIp7IOCBgTpat+vHTvsw
=FCvQ
-----END PGP SIGNATURE-----

Hendrik (mostricht) said : #2

Hi,
i just fixed the problem myself by changing

 fullName = pwd.getpwnam(userName)[4]
to
 fullName = 'postgres'

That worked out!

But I will try your approach and than fill out the report!

Thanks for your support!

Hendrik (mostricht) said : #3

Thanks Daniel Bültmann, that solved my question.

Sebastian Max (smx-comnets) said : #4

Hi Hendrik,

Bugfix is commited (bazaar.launchpad.net/~comnets/openwns-wrowser/trunk, rev 39). Could you please (shorty) check it and give (short) feedback?

BR,
Sebastian

Hendrik (mostricht) said : #5

Hi,
changes look good!

Thanks!
See you next Omega-Meeting :-)

Hendrik

Sebastian Max schrieb:
> Your question #74606 on openWNS-Application changed:
> https://answers.launchpad.net/openwns-application/+question/74606
>
> Sebastian Max posted a new comment:
> Hi Hendrik,
>
> Bugfix is commited (bazaar.launchpad.net/~comnets/openwns-wrowser/trunk,
> rev 39). Could you please (shorty) check it and give (short) feedback?
>
> BR,
> Sebastian
>
>