Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when I run bench new-site site1.local, I really don't know what is happening. Please help #612

Closed
ekhorowa opened this issue Mar 25, 2018 · 1 comment

Comments

@ekhorowa
Copy link

ekhorowa commented Mar 25, 2018

When I run " bench new-site site1.local" , I get the error below

Installing frappe...
Updating DocTypes for frappe        : [========================================]
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/commands/site.py", line 34, in new_site
    verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/commands/site.py", line 69, in _new_site
    _install_app(app, verbose=verbose, set_as_patched=not source_sql)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/installer.py", line 147, in install_app
    add_to_installed_apps(name)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/installer.py", line 168, in add_to_installed_apps
    post_install(rebuild_website)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/installer.py", line 232, in post_install
    init_singles()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/installer.py", line 253, in init_singles
    doc.save()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 256, in save
    return self._save(*args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 279, in _save
    self.insert()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert
    self.run_post_save_methods()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods
    self.run_method("on_update")
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 1029, in composer
    return composed(self, method, *args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 1012, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py", line 25, in on_update
    self.restrict_roles_and_modules()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py", line 30, in restrict_roles_and_modules
    active_domains = frappe.get_active_domains()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/__init__.py", line 1414, in get_active_domains
    return get_active_domains()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py", line 70, in get_active_domains
    return frappe.cache().get_value("active_domains", _get_active_domains)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 72, in get_value
    val = generator()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py", line 64, in _get_active_domains
    fields=["domain"], distinct=True)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/__init__.py", line 1178, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/__init__.py", line 1151, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/db_query.py", line 87, in execute
    result = self.build_and_run()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/model/db_query.py", line 111, in build_and_run
    return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/apps/frappe/frappe/database.py", line 188, in sql
    self._cursor.execute(query)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py", line 165, in execute
    result = self._query(query)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py", line 321, in _query
    conn.query(q)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 860, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 1061, in _read_query_result
    result.read()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 1349, in read
    first_packet = self.connection._read_packet()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 1018, in _read_packet
    packet.check_error()
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 384, in check_error
    err.raise_mysql_exception(self._data)
  File "/Users/andelaeveloper/Desktop/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.InternalError: (3065, u"Expression #1 of ORDER BY clause is not in SELECT list, references column 'b2ad9c72b3da46b3.tabHas Domain.modified' which is not in SELECT list; this is incompatible with DISTINCT")
@codingCoffee
Copy link
Contributor

Unable to replicate. Closing this. Feel free to reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants