Hi
I installed an configured sahana-eden on my ubuntu 10.10 machine according to the following document on sahana wiki.
http://eden.sahanafoundation.org/wiki/InstallationGuidelinesDeveloper
When I run run the web2py server first time and go to sahana it gives me the following error.
Ticket issued: eden/127.0.0.1.2011-06-29.22-13-29.86b9094e-37bb-43dd-9b03-7fe93c2188c5
|
web2py™ |
Version 1.92.1 (2011-03-01 09:16:48) |
|---|---|
|
Python |
Python 2.6.6: /usr/bin/python |
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. |
Traceback (most recent call last):
File "/home/kasun/web2py/gluon/restricted.py", line 188, in restricted
exec ccode in environment
File "/home/kasun/web2py/applications/eden/models/000_1st_run.py", line 18, in <module>
s3base = local_import("s3")
File "/home/kasun/web2py/gluon/compileapp.py", line 237, in <lambda>
local_import_aux(name,reload,app)
File "/home/kasun/web2py/gluon/compileapp.py", line 168, in local_import_aux
module = __import__(name)
File "applications/eden/modules/s3/__init__.py", line 70, in <module>
from s3crud import *
File "applications/eden/modules/s3/s3crud.py", line 58, in <module>
from s3pdf import S3PDF
File "applications/eden/modules/s3/s3pdf.py", line 103, in <module>
class S3PDF(S3Method):
File "applications/eden/modules/s3/s3pdf.py", line 895, in S3PDF
class S3PDFOCRForm(BaseDocTemplate):
NameError: name 'BaseDocTemplate' is not defined
|
However in first time configuration of web2py and sahana I didn't configure the optional configurations mentioned in above document(Specially the database).
Then after receiving this error I configured the MySql database (create a empty sahana database)as indicated in the optional requirements.
Is it necessary to configure a database before running sahana-eden?
Same kind of problem is reported as a sahana bug here: https://bugs.launchpad.net/sahana-eden/+bug/739250 , but it says its fixed-committed.
How do I overcome this error?
Thank you
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sahana-eden/-/4suaERlyaXoJ.
To post to this group, send email to sahan...@googlegroups.com.
To unsubscribe from this group, send email to sahana-eden...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sahana-eden?hl=en.
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sahana-eden/-/sWheW8kha28J.
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
I suspect that MySQL is only listening to localhost. this can be shown via:
netstat -antpu | grep 3306
If you need access from non-localhost (which you probably don't) then:
http://lists.mysql.com/mysql/209516
There may be an OS-dependent method too...
F
kasun@kasun-Vostro-1520:~$ sudo mysqladmin -h `hostname` --port=3306 version
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To post to this group, send email to sahan...@googlegroups.com.
To unsubscribe from this group, send email to sahana-eden...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sahana-eden?hl=en.
http://eden.sahanafoundation.org/ticket/726
F
On 30 June 2011 12:24, kasun perera <kkasun...@gmail.com> wrote:
> deployment_settings.database.password = "ff@scdmc"
http://eden.sahanafoundation.org/ticket/726On 30 June 2011 12:24, kasun perera <kkasun...@gmail.com> wrote:
> deployment_settings.database.password = "ff@scdmc"
Done :)
F
I still get the same error-Cannot connect to mysql Database: localhost:3306/sahana--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To post to this group, send email to sahan...@googlegroups.com.
To unsubscribe from this group, send email to sahana-eden...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sahana-eden?hl=en.
Its not finishI still get the same error-Cannot connect to mysql Database: localhost:3306/sahana
here is my new 000_config.py database settingsdeployment_settings.database.db_type = "mysql"deployment_settings.database.password = "kasun"
deployment_settings.database.host = "localhost"
deployment_settings.database.port = None # use default
deployment_settings.database.database = "sahana"
deployment_settings.database.username = "root"
kasun@kasun-Vostro-1520:~$ mysql --user=root --password=kasun
you probably need to
$ sudo apt-get install python-mysqldb
or
$ sudo apt-get install pymysql
When you startup the web2py server, it will show you the available DB drivers
for mysql, so the startup message of web2py would be of interest here.
Dominic
fredagen den 1 juli 2011 19.13.42 skrev kasun perera:
> Its not finish [?]I still get the same error-Cannot connect to mysql
Whilst advisable for Production reliability, this shouldn't actually
be necessary
> $ sudo apt-get install pymysql
This is included in gluon/contrib so doesn't need installing int he
system Python.
F
but else this is a pure permission problem.
As a trial, I'd recommend to do a
mysql> GRANT ALL ON sahana.* TO sahana@localhost IDENTIFIED by 'password';
and change the DB username in 000_config.py from "root" into "sahana", and the
DB password into "password", as in:
deployment_settings.database.db_type = "mysql"
deployment_settings.database.host = "localhost"
deployment_settings.database.port = None # use default
deployment_settings.database.database = "sahana"
deployment_settings.database.username = "sahana"
deployment_settings.database.password = "password"
deployment_settings.database.pool_size = 30
If that does not work for you, then the DB setup is wrong, somehow.
Dominic
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To post to this group, send email to sahan...@googlegroups.com.
To unsubscribe from this group, send email to sahana-eden...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sahana-eden?hl=en.
$mysql --user=sahana --password=password password
mysql> USE sahana;
my File permition for webpy folder is this hope its ok-
drwxr-xr-x 10 kasun kasun 4096 2011-07-02 10:19 web2py
when I run the web2py it gives foowing output
kasun@kasun-Vostro-1520:~/web2py$ python web2py.py
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011Database drivers available: SQLite3, pymysql, CouchDB
Version 1.92.1 (2011-03-01 09:16:48)
Starting hardcron...
please visit:
http://127.0.0.1:8000
starting browser...
but when I run eden it will give the error Cannot connect to mysql Database: localhost:3306/sahana
And in command propmt it prints
S3 Debug: s3task: Celery not installed or Configured, Tasks will run Synchronously.
but I have already installed celery-2.2.7
Is this the prob then how to configure celery?
Also, delete the test tables you made above, so the sahana database is empty. Then delete everything in your web2py/applications/eden/databases directory, so web2py will start over with a fresh database. If that doesn't work...
I've not yet seen you try:
mysql -h localhost --user=sahana --password=password
F
F
--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To post to this group, send email to sahan...@googlegroups.com.
To unsubscribe from this group, send email to sahana-eden...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sahana-eden?hl=en.
> my SQl command outputsI've not yet seen you try:
> $mysql --user=sahana --password=password password
mysql -h localhost --user=sahana --password=password
So this is an example of the naked excepts that Mike was referring to in a earlier email.
& fixed now :)
Thanks lifeeth!
> So this is an example of the naked excepts that Mike was referring to
No, this is actually the opposite - the exception tries to be handled
properly, but actually causes more problems in so doing since it
itself had a problem too!
I guess I never triggered this before as, when not using pgsql, I
always use MySQLdb as the driver & this would only trigger if trying
to fallback to pymysql...
F
So this is an example of the naked excepts that Mike was referring toNo, this is actually the opposite - the exception tries to be handled
properly, but actually causes more problems in so doing since it
itself had a problem too!