Getting error in installing erpnext

I am trying to install erpnext on my ubuntu 12.04 but getting following error… please help

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 49, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 66, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 531, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/page/applications/applications.py”, line 36, in install_app
frappe.installer.install_app(name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 114, in install_app
sync_for(name, force=True, sync_everything=True, verbose=verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 34, in sync_for
import_file_by_path(doc_path, force=force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 50, in import_file_by_path
import_doc(doc, force=force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 111, in import_doc
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 162, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 442, in run_post_save_methods
self.run_method(“on_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 412, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 493, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 476, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 406, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 100, in on_update
module = load_doctype_module(self.name, self.module)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/init.py”, line 58, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(get_module_name(doctype, module, prefix))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 379, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/support/doctype/newsletter/newsletter.py”, line 11, in
import erpnext.tasks
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/tasks.py”, line 8, in
@celery_task()
File “/home/frappe/frappe-bench/apps/frappe/frappe/celery_app.py”, line 85, in celery_task
return get_celery().task(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/celery_app.py”, line 34, in get_celery
setup_celery(_app, conf)
File “/home/frappe/frappe-bench/apps/frappe/frappe/celery_app.py”, line 40, in setup_celery
sites_path=SITES_PATH))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 408, in get_all_apps
apps = get_file_items(os.path.join(sites_path, “apps.txt”), raise_not_found=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 493, in get_file_items
content = read_file(path, raise_not_found=raise_not_found)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 512, in read_file
raise IOError(“{} Not Found”.format(path))
IOError: ./apps.txt Not Found

what command did you use?

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --setup-production

I use this command.

hi

now I have installed fresh ubuntu system and run the same command

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

sudo bash setup_frappe.sh --setup-production

Now it is giving me the following error,

Traceback (most recent call last):
File “/home/erpnext/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.11.1’, ‘console_scripts’, ‘frappe’)()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 54, in main
return run(fn, parsed_args)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 82, in run
out = globals().get(fn)(*args.get(fn), **args)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 68, in new_fn
return fn(*args, **new_kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 337, in install
_install(db_name, root_login, root_password, source_sql, admin_password, force, site_config, reinstall, quiet, install_apps)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 318, in _install
admin_password = admin_password, verbose=verbose, force=force, site_config=site_config, reinstall=reinstall)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/installer.py”, line 31, in install_db
create_database_and_user(force, verbose)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/installer.py”, line 48, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 359, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 79, in sql
self.connect()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 49, in connect
use_unicode=True, charset=‘utf8’)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, “Access denied for user ‘root’@‘localhost’ (using password: YES)”)
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 38, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 131, in new_site
_new_site(site, mariadb_root_password=mariadb_root_password, admin_password=admin_password)
File “/home/erpnext/bench-repo/bench/utils.py”, line 86, in new_site
), cwd=os.path.join(bench, ‘sites’))
File “/home/erpnext/bench-repo/bench/utils.py”, line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘/home/erpnext/frappe-bench/env/bin/frappe --install site1.local site1.local --root_password xbs7NtIltZoAy7W5 --admin_password vE8KM2UFKFyrjiHb’ returned non-zero exit status 1

I have referred some lines I think this is because of the mysql password but the script haven’t asked me to enter mysql password ?

Any Idea

Are you installing on a fresh install? I suspect that mysql was installed prior to running the script and that is why the root password didn’t get set.

Yes I am installing on the fresh system, but the mysql was installed earlier, but I thought the script will ask me the password before installing the erpnext database structure in mysql but it didn’t if that is the case where I can set password in installer script ?

You can pass --mysql-root-password {root_password} to the script

Yes it worked now… thanks for your help…

There is one more problem, after installation my screen is stuck on initialization,

It stuck at setting up Screen and not moving ahead.

In we error log file I got the following log

File “/home/erpnext/frappe-bench/apps/frappe/frappe/boot.py”, line 137, in add_home_page
frappe.message_log.pop()
IndexError: pop from empty list


[2015-02-07 14:41:48 +0000] [20349] [INFO] Starting gunicorn 19.2.1
[2015-02-07 14:41:48 +0000] [20349] [INFO] Listening at: http://127.0.0.1:8000 (20349)
[2015-02-07 14:41:48 +0000] [20349] [INFO] Using worker: sync
[2015-02-07 14:41:48 +0000] [20354] [INFO] Booting worker with pid: 20354
[2015-02-07 14:41:48 +0000] [20360] [INFO] Booting worker with pid: 20360

Dear pdvyas,

Please help me, I have tried it with manual installation, but screen got stuck at the webgui “setting up” page. I am trying it on ubuntu 12.04 64 bit do you have any other OS recommendation ? Please let me know.

Regards,

Your installation looks good. Seems there is an issue with setup wizard. Looking into it.

Can you run a

bench update

and try again?

I am getting this error while running bench update

Already up-to-date.

From

  • branch develop → FETCH_HEAD
    Already up-to-date.
    From
  • branch master → FETCH_HEAD
    Already up-to-date.
    remote: Counting objects: 13, done.
    remote: Compressing objects: 100% (12/12), done.
    remote: Total 13 (delta 3), reused 0 (delta 0)
    Unpacking objects: 100% (13/13), done.
    From
  • branch master → FETCH_HEAD
    Updating dbba4b9…d99a9fb
    Fast-forward
    frappe/version.py | 2 ±
    frappe/hooks.py | 2 ±
    frappe/utils/email_lib/email_body.py | 2 –
    frappe/utils/email_lib/smtp.py | 2 ++
    setup.py | 2 ±
    5 files changed, 5 insertions(+), 5 deletions(-)
    database backup taken - ./peerp/private/backups/20150209_70546490_database.sql.gz - on 2015-02-09 16:27:57.538537

Running latest for peerp

Updating frappe : [========================================]
Updating erpnext : [========================================]
Updating shopping_cart : [========================================]
Wrote ./assets/js/frappe-web.min.js - 90k
Wrote ./assets/js/shopping-cart-web.min.js - 1k
Wrote ./assets/js/print_format_v3.min.js - 18k
Wrote ./assets/js/erpnext.min.js - 15k
Wrote ./assets/css/frappe.css - 221k
Wrote ./assets/css/frappe-web.css - 163k
Wrote ./assets/css/shopping-cart-web.css - 0k
Wrote ./assets/js/editor.min.js - 27k
Wrote ./assets/css/erpnext.css - 0k
Wrote ./assets/js/frappe.min.js - 609k
Wrote ./assets/js/erpnext-web.min.js - 0k
Wrote ./assets/js/slickgrid.min.js - 105k
Wrote ./assets/js/canvasResize.min.js - 22k
error: <class ‘xmlrpclib.Fault’>, <Fault 10: ‘BAD_NAME: frappe’>: file: /usr/lib/python2.7/xmlrpclib.py line: 793
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 38, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 176, in update
restart_supervisor_processes()
File “/home/erpnext/bench-repo/bench/utils.py”, line 219, in restart_supervisor_processes
exec_cmd(cmd, cwd=bench)
File “/home/erpnext/bench-repo/bench/utils.py”, line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘sudo supervisorctl restart frappe:’ returned non-zero exit status 2

What does sudo supervisorctl restart frappe: say? Did you install manually (ie. not used the script?)

yes this time I have installed manually not from script… I thought that I am missing something in script…

the command given by you is giving me following error

frappe: ERROR (no such process)
frappe: ERROR (no such process)

What does bench setup production say?

Usage: bench setup production [OPTIONS] USER

Error: Missing argument “user”.

Run: bench setup production frappe

Hello @rmheta, this is a real problem. I just also got the image today and have update 3 times today; yet the startup screen is stuck at ‘setting up’. There seems to be a real issue; first there was the black screen; the first update today took care of that; now the system never finishes up the setup process.

Sorry we just released version 5 a few days ago. I assume the initial issues are resolved now.