Issue: jinja2.exceptions.TemplateNotFound: Procfile

Hello Guys,

I have faced issue while install frappe branch through below command.

Satellite-Pro-C50-A:~/project/erpnext/frappe-bench$ bench init frappe-bench --frappe-branch develop
Satellite-Pro-C50-A:~/project/erpnext/frappe-bench$ bench setup procfile
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench==4.1.0', 'console_scripts', 'bench')()
  File "/usr/local/lib/python2.7/dist-packages/bench-4.1.0-py2.7.egg/bench/cli.py", line 40, in cli
    bench_command()
  File "/home/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/bench-4.1.0-py2.7.egg/bench/commands/setup.py", line 135, in setup_procfile
    setup_procfile('.')
  File "/usr/local/lib/python2.7/dist-packages/bench-4.1.0-py2.7.egg/bench/config/procfile.py", line 13, in setup_procfile
    procfile = bench.env.get_template('Procfile').render(
  File "/home/.local/lib/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/.local/lib/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/.local/lib/python2.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/.local/lib/python2.7/site-packages/jinja2/loaders.py", line 235, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: Procfile

Anybody has solution?

Please Help me.

Thanks.

How did you install bench??
I think bench is not correctly installed.
Follow these steps:

git clone https://github.com/frappe/bench
pip install ./bench

delete the existing frappe-bench directory and try to do a bench init frappe-bench again

Hello @codingCoffee,

Thanks for Replay!!

I will try for same.

Again Thank you very much. :slight_smile:

Hi @Ketan.ERPNext, no problem. Try the same and if you get any error, please feel free to post them here. Also can you mention how had you installed bench?? It would be helpful for replicating and debugging.

Hello @codingCoffee,

Above issue has been resolved but I have start bench that time below issue still raise.

12:51:38 system           | redis_socketio.1 started (pid=6947)
12:51:38 system           | worker_long.1 started (pid=6948)
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.277 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:51:38 redis_socketio.1 |                 _._                                                  
12:51:38 redis_socketio.1 |            _.-``__ ''-._                                             
12:51:38 redis_socketio.1 |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
12:51:38 redis_socketio.1 |   .-`` .-```.  ```\/    _.,_ ''-._                                   
12:51:38 redis_socketio.1 |  (    '      ,       .-`  | `,    )     Running in standalone mode
12:51:38 redis_socketio.1 |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 12000
12:51:38 redis_socketio.1 |  |    `-._   `._    /     _.-'    |     PID: 6952
12:51:38 redis_socketio.1 |   `-._    `-._  `-./  _.-'    _.-'                                   
12:51:38 redis_socketio.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
12:51:38 redis_socketio.1 |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
12:51:38 redis_socketio.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
12:51:38 redis_socketio.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
12:51:38 redis_socketio.1 |  |    `-._`-._        _.-'_.-'    |                                  
12:51:38 redis_socketio.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
12:51:38 redis_socketio.1 |       `-._    `-.__.-'    _.-'                                       
12:51:38 redis_socketio.1 |           `-._        _.-'                                           
12:51:38 redis_socketio.1 |               `-.__.-'                                               
12:51:38 redis_socketio.1 | 
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.278 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.278 # Server started, Redis version 3.0.6
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.278 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.278 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.278 * The server is now ready to accept connections on port 12000
12:51:38 system           | worker_default.1 started (pid=6956)
12:51:38 system           | schedule.1 started (pid=6961)
12:51:38 system           | watch.1 started (pid=6964)
12:51:38 system           | redis_queue.1 started (pid=6969)
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.298 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:51:38 redis_queue.1    |                 _._                                                  
12:51:38 redis_queue.1    |            _.-``__ ''-._                                             
12:51:38 redis_queue.1    |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
12:51:38 redis_queue.1    |   .-`` .-```.  ```\/    _.,_ ''-._                                   
12:51:38 redis_queue.1    |  (    '      ,       .-`  | `,    )     Running in standalone mode
12:51:38 redis_queue.1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 11000
12:51:38 redis_queue.1    |  |    `-._   `._    /     _.-'    |     PID: 6970
12:51:38 redis_queue.1    |   `-._    `-._  `-./  _.-'    _.-'                                   
12:51:38 redis_queue.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
12:51:38 redis_queue.1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
12:51:38 redis_queue.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
12:51:38 redis_queue.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
12:51:38 redis_queue.1    |  |    `-._`-._        _.-'_.-'    |                                  
12:51:38 redis_queue.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
12:51:38 redis_queue.1    |       `-._    `-.__.-'    _.-'                                       
12:51:38 redis_queue.1    |           `-._        _.-'                                           
12:51:38 redis_queue.1    |               `-.__.-'                                               
12:51:38 redis_queue.1    | 
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.299 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.299 # Server started, Redis version 3.0.6
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.299 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.299 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.299 * The server is now ready to accept connections on port 11000
12:51:38 system           | worker_short.1 started (pid=6963)
12:51:38 system           | socketio.1 started (pid=6962)
12:51:38 socketio.1       | /bin/sh: 1: /usr/local/bin/node: not found
12:51:38 system           | socketio.1 stopped (rc=127)
12:51:38 system           | redis_cache.1 started (pid=6972)
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.307 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:51:38 redis_cache.1    |                 _._                                                  
12:51:38 redis_cache.1    |            _.-``__ ''-._                                             
12:51:38 redis_cache.1    |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
12:51:38 redis_cache.1    |   .-`` .-```.  ```\/    _.,_ ''-._                                   
12:51:38 redis_cache.1    |  (    '      ,       .-`  | `,    )     Running in standalone mode
12:51:38 redis_cache.1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 13000
12:51:38 redis_cache.1    |  |    `-._   `._    /     _.-'    |     PID: 6978
12:51:38 redis_cache.1    |   `-._    `-._  `-./  _.-'    _.-'                                   
12:51:38 redis_cache.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
12:51:38 redis_cache.1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
12:51:38 redis_cache.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
12:51:38 redis_cache.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
12:51:38 redis_cache.1    |  |    `-._`-._        _.-'_.-'    |                                  
12:51:38 redis_cache.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
12:51:38 redis_cache.1    |       `-._    `-.__.-'    _.-'                                       
12:51:38 redis_cache.1    |           `-._        _.-'                                           
12:51:38 redis_cache.1    |               `-.__.-'                                               
12:51:38 redis_cache.1    | 
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.308 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.308 # Server started, Redis version 3.0.6
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.308 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.308 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.308 * The server is now ready to accept connections on port 13000
12:51:38 system           | web.1 started (pid=6973)
12:51:38 system           | sending SIGTERM to redis_socketio.1 (pid 6947)
12:51:38 system           | sending SIGTERM to worker_long.1 (pid 6948)
12:51:38 system           | sending SIGTERM to watch.1 (pid 6964)
12:51:38 system           | sending SIGTERM to redis_queue.1 (pid 6969)
12:51:38 system           | sending SIGTERM to web.1 (pid 6973)
12:51:38 system           | sending SIGTERM to schedule.1 (pid 6961)
12:51:38 system           | sending SIGTERM to worker_default.1 (pid 6956)
12:51:38 system           | sending SIGTERM to redis_cache.1 (pid 6972)
12:51:38 system           | sending SIGTERM to worker_short.1 (pid 6963)
12:51:38 system           | web.1 stopped (rc=-15)
12:51:38 redis_queue.1    | 6970:signal-handler (1525159298) Received SIGTERM scheduling shutdown...
12:51:38 system           | worker_long.1 stopped (rc=-15)
12:51:38 system           | worker_default.1 stopped (rc=-15)
12:51:38 redis_socketio.1 | 6952:signal-handler (1525159298) Received SIGTERM scheduling shutdown...
12:51:38 redis_cache.1    | 6978:signal-handler (1525159298) Received SIGTERM scheduling shutdown...
12:51:38 system           | schedule.1 stopped (rc=-15)
12:51:38 system           | watch.1 stopped (rc=-15)
12:51:38 system           | worker_short.1 stopped (rc=-15)
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.378 # User requested shutdown...
12:51:38 redis_socketio.1 | 6952:M 01 May 12:51:38.379 # Redis is now ready to exit, bye bye...
12:51:38 system           | redis_socketio.1 stopped (rc=-15)
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.399 # User requested shutdown...
12:51:38 redis_queue.1    | 6970:M 01 May 12:51:38.399 # Redis is now ready to exit, bye bye...
12:51:38 system           | redis_queue.1 stopped (rc=-15)
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.408 # User requested shutdown...
12:51:38 redis_cache.1    | 6978:M 01 May 12:51:38.408 # Redis is now ready to exit, bye bye...
12:51:38 system           | redis_cache.1 stopped (rc=-15)

Any idea about it ?

Thanks.

Hello, I am facing the same problem installing frappe bench… have you solve it already?

Thanks
Jaime