[Update] Frappe version 6 has been merged into develop

Hi,

I also getting same error even after your fix.

hemant@ubuntu:~/frappe-bench$ bench update --upgrade
Already up-to-date.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/hemant/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/hemant/bench-repo/bench/cli.py”, line 240, in _update
update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade)
File “/home/hemant/bench-repo/bench/cli.py”, line 253, in update
validate_upgrade(version_upgrade[0], version_upgrade[1], bench=bench_path)
TypeError: ‘bool’ object has no attribute ‘getitem
hemant@ubuntu:~/frappe-bench$

Ah lovely! I had read long back someone had made a reverse auction system using frappe. Think to have it running on frappe 6 would be great!

Hi,

I ran ‘bench switch-to-develop’ and then ‘bench update --patch’ and all is working.

Thnx

You will also need to run bench setup socketio or disable async by setting “disable_async”: 1 in common_site_config.json or site_config.json

[edit] changed no_async to disable_async for consistency

Im getting an error:
hemant@ubuntu:~/frappe-bench$ bench setup socketio
/bin/sh: 1: npm: not found
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/hemant/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/hemant/bench-repo/bench/cli.py”, line 478, in _setup_socketio
setup_socketio()
File “/home/hemant/bench-repo/bench/utils.py”, line 112, in setup_socketio
exec_cmd(“npm install nodemon socket.io redis express superagent cookie”, cwd=bench)
File “/home/hemant/bench-repo/bench/utils.py”, line 104, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install nodemon socket.io redis express superagent cookie
hemant@ubuntu:~/frappe-bench$

have you got a way to install just npm or must node also be installed?

npm is node package manager. So you need both node and npm. We have added a validation in the bench update script. You will need to install it using sudo apt-get install nodejs npm

Also you will need to run bench setup socketio. I am fixing these issues in the upgrade process so that others don’t face it in the future.


additional steps so far for you:

bench setup socketio
bench setup supervisor
bench setup nginx
service nginx reload
supervisorctl reload

I am getting this error:

any ideas is it related to v6 or not.

Hi @adityaduggal

Did you run bench update --upgrade?

I am getting this error on running bench update --upgrade

Try bench setup supervisor and try update again

Nope…Same error.

hmm… also after bench setup supervisor, run sudo supervisorctl reload and try

Once again getting the same error.

Hi @adityaduggal

if this is on the server, I can access it and see what the issue is.

Thanks,
Anand.

No this is on test local system…besides I have stopped using develop on my production server…learned it the hard way some time ago.

Ok. Looks like your supervisor config is the problem. Can you go to your frappe-bench folder and tell me the output of:
cat config/supervisor.conf?

Hi. The installation went well.

After i issue bench setup socketio i got this error: /bin/sh: ./node_modules/.bin/nodemon: No such file or directory. This is because bench put .bin folder inside my ~/node_modules. To fix it i have to copy and past to frappe_bench folder.

I have also to issue bench setup redis-async-broker and bench setup redis-cache.

After fix .bin folder problem i start frappe with bench start and i got this error:

[2015-08-17 19:19:04,804: ERROR/MainProcess] Task frappe.tasks.scheduler_task[eda3a75b-f4d4-479c-9eb6-e739e240495a] raised unexpected: AttributeError("'int' object has no attribute 'write'",)
19:19:04 worker.1             | Traceback (most recent call last):
19:19:04 worker.1             |   File "/Users/saguas/erpnext4/erpnext/frappe_v5/frappe-bench/env/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
19:19:04 worker.1             |     R = retval = fun(*args, **kwargs)
19:19:04 worker.1             |   File "/Users/saguas/erpnext4/erpnext/frappe_v5/frappe-bench/env/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
19:19:04 worker.1             |     return self.run(*args, **kwargs)
19:19:04 worker.1             |   File "/Users/saguas/erpnext4/erpnext/frappe_v5/frappe-bench/apps/frappe/frappe/tasks.py", line 90, in scheduler_task
19:19:04 worker.1             |     frappe.get_attr(handler)()
19:19:04 worker.1             |   File "/Users/saguas/erpnext4/erpnext/frappe_v5/frappe-bench/apps/jasper_erpnext_report/jasper_erpnext_report/utils/scheduler.py", line 308, in clear_expired
19:19:04 worker.1             |     clear_expired_jasper_reports(force=force)
19:19:04 worker.1             |   File "/Users/saguas/erpnext4/erpnext/frappe_v5/frappe-bench/apps/jasper_erpnext_report/jasper_erpnext_report/utils/scheduler.py", line 221, in clear_expired_jasper_reports
19:19:04 worker.1             |     clear_all_jasper_reports(force=force)
19:19:04 worker.1             |   File "/Users/saguas/erpnext4/erpnext/frappe_v5/frappe-bench/apps/jasper_erpnext_report/jasper_erpnext_report/utils/scheduler.py", line 179, in clear_all_jasper_reports
19:19:04 worker.1             |     print _("No file was removed.")
19:19:04 worker.1             | AttributeError: 'int' object has no attribute 'write'

Also this warning:

19:19:08 socketio.1 | 17 Aug 19:19:08 - [nodemon] watching 25,008 files - this might cause high cpu usage. To reduce use “–watch”.

My question is: you just want to watch for changes in apps/frappe/socketio.js or the entire working dir? For now i put --watch only for socketio.js.

Thanks.

I’m getting the following error when I do bench start:

bench start
19:57:43 system               | workerbeat.1 started (pid=14481)
19:57:43 system               | socketio.1 started (pid=14485)
19:57:43 socketio.1           | /usr/bin/env: node: No such file or directory
19:57:43 system               | socketio.1 stopped (rc=127)
19:57:43 system               | redis_cache.1 started (pid=14488)
19:57:43 redis_cache.1        | [14492] 17 Aug 19:57:43.727 # Fatal error, can't open config file 'config/redis_cache.conf'
19:57:43 system               | redis_cache.1 stopped (rc=1)
19:57:43 system               | worker.1 started (pid=14489)
19:57:43 system               | redis_async_broker.1 started (pid=14497)
19:57:43 system               | web.1 started (pid=14496)
19:57:43 system               | sending SIGTERM to workerbeat.1 (pid 14481)
19:57:43 system               | sending SIGTERM to worker.1 (pid 14489)
19:57:43 system               | sending SIGTERM to web.1 (pid 14496)
19:57:43 system               | sending SIGTERM to redis_async_broker.1 (pid 14497)
19:57:43 system               | worker.1 stopped (rc=-15)
19:57:43 system               | workerbeat.1 stopped (rc=-15)
19:57:43 system               | web.1 stopped (rc=-15)
19:57:43 redis_async_broker.1 | [14500] 17 Aug 19:57:43.786 # Fatal error, can't open config file 'config/redis_async_broker.conf'
19:57:43 system               | redis_async_broker.1 stopped (rc=1)

So if I’ve looked in the config folder and there is only the one redis related file which is called redis.conf

I also have nginx.conf (along with a few saved versions) and supervisor.conf

So I thought perhaps the upgrade didn’t complete correctly, even though there were no errors reported, so I then ran:

bench setup socketio
bench setup supervisor
bench setup nginx
service nginx reload
supervisorctl reload

I re-ran bench update --upgrade and now I get this error:

bench update --upgrade
Already up-to-date.
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
Database backed up /home/eamonn/frappe-bench/sites/new-site1.local/private/backups/20150817_50819592_database.sql.gz
Database backed up /home/eamonn/frappe-bench/sites/site1.local/private/backups/20150817_73929522_database.sql.gz
Migrating new-site1.local
Updating frappe                     : [========================================]
Migrating site1.local
Updating frappe                     : [========================================]
Updating erpnext                    : [========================================]
Wrote ./assets/js/print_format_v3.min.js - 18k
Wrote ./assets/js/frappe-web.min.js - 274k
Wrote ./assets/js/form.min.js - 94k
Wrote ./assets/js/report.min.js - 155k
Wrote ./assets/js/erpnext.min.js - 33k
Wrote ./assets/css/list.min.css - 5k
Wrote ./assets/js/erpnext-web.min.js - 1k
Wrote ./assets/css/report.min.css - 7k
Wrote ./assets/css/frappe-web.css - 54k
Wrote ./assets/js/list.min.js - 60k
Wrote ./assets/js/desk.min.js - 854k
Wrote ./assets/css/form.min.css - 1k
Wrote ./assets/js/editor.min.js - 26k
Wrote ./assets/css/erpnext.css - 1k
Wrote ./assets/css/desk.min.css - 254k
Wrote ./assets/js/module.min.js - 5k
Wrote ./assets/css/module.min.css - 0k
error: <class 'xmlrpclib.Fault'>, <Fault 10: 'BAD_NAME: frappe'>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/eamonn/bench-repo/bench/cli.py", line 60, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/eamonn/bench-repo/bench/cli.py", line 241, in _update
    update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/eamonn/bench-repo/bench/cli.py", line 277, in update
    restart_supervisor_processes(bench=bench_path)
  File "/home/eamonn/bench-repo/bench/utils.py", line 303, in restart_supervisor_processes
    exec_cmd(cmd, cwd=bench)
  File "/home/eamonn/bench-repo/bench/utils.py", line 104, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: sudo supervisorctl restart frappe:

So I’m a little bit stuck now.

Any help appreciated.

Hi. I thinks you still need to issue:

bench setup redis-async-broker and bench setup redis-cache.