Fresh Installation for Development not working

Hi All,
I just did a fresh installation of ERPNext with the below steps but after installation when I did the try to run it using localhost:8000, I am getting the below error.

Installation Steps:

Step 1:

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

Step 2:

sudo python install.py --develop

Regards
Ruchin Sharma


RuntimeError

RuntimeError: no object bound to conf
Traceback (most recent call last)

File "/home/workshop/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__

return super(StaticDataMiddleware, self).__call__(environ, start_response)

File "/home/workshop/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__

return self.app(environ, start_response)

File "/home/workshop/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__

return self.app(environ, start_response)

File "/home/workshop/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application

return ClosingIterator(app(environ, start_response), self.cleanup)

File "/home/workshop/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 291, in application

return f(*args[:-2] + (request,))(*args[-2:])

File "/home/workshop/frappe-bench/apps/frappe/frappe/app.py", line 81, in application

response = handle_exception(e)

File "/home/workshop/frappe-bench/apps/frappe/frappe/app.py", line 145, in handle_exception

response = frappe.website.render.render("message", http_status_code=http_status_code)

File "/home/workshop/frappe-bench/apps/frappe/frappe/website/render.py", line 22, in render

path = resolve_path(path or frappe.local.request.path.strip('/ '))

File "/home/workshop/frappe-bench/apps/frappe/frappe/website/render.py", line 166, in resolve_path

path = resolve_from_map(path)

File "/home/workshop/frappe-bench/apps/frappe/frappe/website/render.py", line 172, in resolve_from_map

for r in frappe.get_hooks("website_route_rules")])

File "/home/workshop/frappe-bench/apps/frappe/frappe/__init__.py", line 782, in get_hooks

hooks = _dict(cache().get_value("app_hooks", load_app_hooks))

File "/home/workshop/frappe-bench/apps/frappe/frappe/__init__.py", line 215, in cache

redis_server = RedisWrapper.from_url(conf.get('redis_cache')

File "/home/workshop/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 343, in __getattr__

return getattr(self._get_current_object(), name)

File "/home/workshop/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 306, in _get_current_object

raise RuntimeError('no object bound to %s' % self.__name__)

RuntimeError: no object bound to conf

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the “Traceback” headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Edit:
Below is the Output of

bench start

workshop@workshop-VirtualBox:~/frappe-bench$ bench start
11:48:00 system | redis_queue.1 started (pid=30533)
11:48:00 redis_queue.1 | [30539] 12 Oct 11:48:00.753 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
11:48:00 redis_queue.1 | [30539] 12 Oct 11:48:00.753 # Creating Server TCP listening socket 127.0.0.1:11000: bind: Address already in use
11:48:00 system | redis_queue.1 stopped (rc=1)
11:48:00 system | worker_default.1 started (pid=30535)
11:48:00 system | worker_long.1 started (pid=30540)
11:48:00 system | web.1 started (pid=30534)
11:48:00 system | socketio.1 started (pid=30536)
11:48:00 system | watch.1 started (pid=30532)
11:48:00 system | schedule.1 started (pid=30537)
11:48:00 system | redis_socketio.1 started (pid=30538)
11:48:00 redis_socketio.1 | [30561] 12 Oct 11:48:00.841 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
11:48:00 redis_socketio.1 | [30561] 12 Oct 11:48:00.841 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
11:48:00 system | redis_socketio.1 stopped (rc=1)
11:48:00 system | redis_cache.1 started (pid=30558)
11:48:00 redis_cache.1 | [30560] 12 Oct 11:48:00.830 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
11:48:00 redis_cache.1 | [30560] 12 Oct 11:48:00.831 # Creating Server TCP listening socket 127.0.0.1:13000: bind: Address already in use
11:48:00 system | redis_cache.1 stopped (rc=1)
11:48:00 system | worker_short.1 started (pid=30563)
11:48:00 system | sending SIGTERM to worker_long.1 (pid 30540)
11:48:00 system | sending SIGTERM to watch.1 (pid 30532)
11:48:00 system | sending SIGTERM to web.1 (pid 30534)
11:48:00 system | sending SIGTERM to schedule.1 (pid 30537)
11:48:00 system | sending SIGTERM to worker_default.1 (pid 30535)
11:48:00 system | sending SIGTERM to socketio.1 (pid 30536)
11:48:00 system | sending SIGTERM to worker_short.1 (pid 30563)
11:48:00 system | worker_long.1 stopped (rc=-15)
11:48:00 system | schedule.1 stopped (rc=-15)
11:48:00 system | watch.1 stopped (rc=-15)
11:48:00 system | worker_default.1 stopped (rc=-15)
11:48:00 system | web.1 stopped (rc=-15)
11:48:00 system | socketio.1 stopped (rc=-15)
11:48:00 system | worker_short.1 stopped (rc=-15)
workshop@workshop-VirtualBox:~/frappe-bench$ bench start
11:48:13 system | redis_queue.1 started (pid=30587)
11:48:13 redis_queue.1 | [30593] 12 Oct 11:48:13.025 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
11:48:13 redis_queue.1 | [30593] 12 Oct 11:48:13.025 # Creating Server TCP listening socket 127.0.0.1:11000: bind: Address already in use
11:48:13 system | redis_queue.1 stopped (rc=1)
11:48:13 system | web.1 started (pid=30588)
11:48:13 system | worker_default.1 started (pid=30591)
11:48:13 system | schedule.1 started (pid=30589)
11:48:13 system | redis_socketio.1 started (pid=30595)
11:48:13 redis_socketio.1 | [30601] 12 Oct 11:48:13.045 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
11:48:13 redis_socketio.1 | [30601] 12 Oct 11:48:13.045 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use
11:48:13 system | redis_socketio.1 stopped (rc=1)
11:48:13 system | socketio.1 started (pid=30590)
11:48:13 system | worker_long.1 started (pid=30597)
11:48:13 system | redis_cache.1 started (pid=30605)
11:48:13 redis_cache.1 | [30610] 12 Oct 11:48:13.076 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
11:48:13 redis_cache.1 | [30610] 12 Oct 11:48:13.076 # Creating Server TCP listening socket 127.0.0.1:13000: bind: Address already in use
11:48:13 system | redis_cache.1 stopped (rc=1)
11:48:13 system | watch.1 started (pid=30596)
11:48:13 system | worker_short.1 started (pid=30607)
11:48:13 system | sending SIGTERM to worker_long.1 (pid 30597)
11:48:13 system | sending SIGTERM to watch.1 (pid 30596)
11:48:13 system | sending SIGTERM to web.1 (pid 30588)
11:48:13 system | sending SIGTERM to schedule.1 (pid 30589)
11:48:13 system | sending SIGTERM to worker_default.1 (pid 30591)
11:48:13 system | sending SIGTERM to socketio.1 (pid 30590)
11:48:13 system | sending SIGTERM to worker_short.1 (pid 30607)
11:48:13 system | watch.1 stopped (rc=-15)
11:48:13 system | worker_default.1 stopped (rc=-15)
11:48:13 system | socketio.1 stopped (rc=-15)
11:48:13 system | worker_long.1 stopped (rc=-15)
11:48:13 system | worker_short.1 stopped (rc=-15)
11:48:13 system | web.1 stopped (rc=-15)
11:48:13 system | schedule.1 stopped (rc=-15)


I appreciate if anyone can help me in this context.

Regards
Ruchin Sharma

hi @ruchin78,
please check this link



Thanks

@sagar
Frankly speaking, I didn’t understand the thread you shared. I just noticed that it was written that it has been fixed in the month of Jan whereas I am receiving this error today.

I appreciate if anyone can help me in this context.

Regards
Ruchin Sharma

Hi,
can you check your site name is correct?
try to install new-site and checked it.

Thanks

@sagar
I have installed the new site may you please let me know the further steps for the same?

Regards
Ruchin Sharma

After installing the site1.local
I ran the below commands and I got the below errors:

Commands:

  1. apt-get install python-minimal
  2. wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
  3. sudo python install.py --develop

Errors:
TASK [Download wkhtmltopdf] ****************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “failed to create temporary content file: timed out”}
to retry, use: --limit @develop/install.retry

PLAY RECAP *********************************************************************
localhost : ok=14 changed=1 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 349, in
install_bench(args)
File “install.py”, line 108, in install_bench
run_playbook(‘develop/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 299, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘develop/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=workshop’]’ returned non-zero exit status 2

Regards
Ruchin Sharma

@shreyasp can you please help him?

1 Like

Before closing this issue, I was checking this thread due to a similar problem. I verified that the currentsite.txt had the correct site specified. When that was verified, and the problem persisted, I double-checked the erpnext.vm/site_config.json file. Indeed, I had a typo and not added double quotes to the line that enables developer mode:

Incorrect

"developer_mode: 1

Correct

"developer_mode": 1

Once I did this, the developer VirtualBox machine worked.

1 Like

fixed my problem also,

I have another similar typo: “developer_mode”: "1, to be corrected as “developer_mode”: 1

1 Like