Jun 5, 2018

solved erpnext help doesn't exist

error is :

ProgrammingError: (1146, u"Table 'xxxxx .help' doesn't exist")
SOLUTION is  : 
bench setup-help
Read more ...

Jun 4, 2018

SOLVED erpnext can not find variables.less

the error :

19:06:15 watch.1          | Error compiling  erpnext.less
19:06:15 watch.1          | { [Error: 'variables.less' wasn't found. Tried - variables.less,/home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/variables.less,/home/frappe/frappe-bench/sites/node_modules/variables.less,variables.less]
19:06:15 watch.1          |   message: '\'variables.less\' wasn\'t found. Tried - variables.less,/home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/variables.less,/home/frappe/frappe-bench/sites/node_modules/variables.less,variables.less',
19:06:15 watch.1          |   stack: undefined,
19:06:15 watch.1          |   type: 'File',

19:06:15 watch.1          |   filename: 'erpnext.less',

solutions :

find . -iname variables.less

then copy the file to one of those location, example  :

frappe@ubuntu:~$ cp frappe-bench/apps/frappe/frappe/public/less/variables.less /home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/variables.less


then bench start 
Read more ...

SOLVED Erpnext throw er Unhandled 'error' event ENOSPC

Error :

18:43:14 watch.1          | events.js:160
18:43:14 watch.1          |       throw er; // Unhandled 'error' event
18:43:14 watch.1          |       ^
18:43:14 watch.1          | 
18:43:14 watch.1          | Error: watch /home/frappe/frappe-bench/apps/erpnext/erpnext/education/doctype/academic_year ENOSPC
18:43:14 watch.1          |     at exports._errnoException (util.js:1020:11)
18:43:14 watch.1          |     at FSWatcher.start (fs.js:1451:19)
18:43:14 watch.1          |     at Object.fs.watch (fs.js:1478:11)
18:43:14 watch.1          |     at createFsWatchInstance (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:37:15)
18:43:14 watch.1          |     at setFsWatchListener (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:80:15)
18:43:14 watch.1          |     at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:229:14)
18:43:14 watch.1          |     at FSWatcher.NodeFsHandler._handleDir (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:408:19)
18:43:14 watch.1          |     at FSWatcher.<anonymous> (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:456:19)
18:43:14 watch.1          |     at FSWatcher.<anonymous> (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:461:16)

18:43:14 watch.1          |     at FSReqWrap.oncomplete (fs.js:123:15)


solutions :

frappe@ubuntu:~/frappe-bench$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
fs.inotify.max_user_watches=524288
fs.inotify.max_user_watches = 524288
frappe@ubuntu:~/frappe-bench$ sudo sysctl --system
* Applying /etc/sysctl.d/10-console-messages.conf ...
kernel.printk = 4 4 1 7
* Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
* Applying /etc/sysctl.d/10-kernel-hardening.conf ...
kernel.kptr_restrict = 1
* Applying /etc/sysctl.d/10-link-restrictions.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/10-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
* Applying /etc/sysctl.d/10-ptrace.conf ...
kernel.yama.ptrace_scope = 1
* Applying /etc/sysctl.d/10-zeropage.conf ...
vm.mmap_min_addr = 65536
* Applying /etc/sysctl.d/99-sysctl.conf ...
fs.inotify.max_user_watches = 524288
* Applying /etc/sysctl.conf ...

fs.inotify.max_user_watches = 524288


Read more ...

SOLVED erpnext Error: Cannot find module 'babel-core'


the error :
18:36:54 socketio.1       | listening on *: 9001
18:36:56 watch.1          | module.js:478
18:36:56 watch.1          |     throw err;
18:36:56 watch.1          |     ^
18:36:56 watch.1          | 
18:36:56 watch.1          | Error: Cannot find module 'babel-core'
18:36:56 watch.1          |     at Function.Module._resolveFilename (module.js:476:15)
18:36:56 watch.1          |     at Function.Module._load (module.js:424:25)
18:36:56 watch.1          |     at Module.require (module.js:504:17)
18:36:56 watch.1          |     at require (internal/module.js:20:19)
18:36:56 watch.1          |     at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:4:15)
18:36:56 watch.1          |     at Module._compile (module.js:577:32)
18:36:56 watch.1          |     at Object.Module._extensions..js (module.js:586:10)
18:36:56 watch.1          |     at Module.load (module.js:494:32)
18:36:56 watch.1          |     at tryModuleLoad (module.js:453:12)

18:36:56 watch.1          |     at Function.Module._load (module.js:445:3)

solutions :

npm install babel-core less chokidar babel-preset-es2015 babel-preset-es2016 babel-preset-es2017 babel-preset-babili


Read more ...

SOLVED : pymysql.err.IntegrityError: (1048, u"Column 'translatable' cannot be null")

the error is  :

  File "<string>", line 1, in <module>
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 695, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 155, in reload_doc
    return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 19, in import_files
    reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 24, in import_file
    ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 58, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 132, in import_doc
    doc.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 240, in insert
    d.db_insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 303, in db_insert
    ), list(d.values()))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 166, in sql
    self._cursor.execute(query, values)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 893, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1103, in _read_query_result
    result.read()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1396, in read
    first_packet = self.connection._read_packet()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1059, in _read_packet
    packet.check_error()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 384, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)

pymysql.err.IntegrityError: (1048, u"Column 'translatable' cannot be null")


just simple solutions for this errors are :

~/frappe-bench$ bench mysql
MariaDB [xxxxxxxxxxxxxxx]> ALTER TABLE tabDocField modify column translatable int(1) NULL default 0;
Query OK, 0 rows affected (0.62 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [xxxxxxxxxxxxxxx]>  alter table tabDocField modify column allow_in_quick_entry int(1) NULL default 0;
Query OK, 0 rows affected (0.16 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [xxxxxxxxxxxxxxx]> Ctrl-C -- exit!
Aborted
frappe@ubuntu:~/frappe-bench$ bench update --patch
Read more ...