www.state-it.info

Gran base de respuestas a las preguntas de los desarrolladores
Header decor

Como puede ser corregido un error Failed on: ('date',?

notfallen 2016-09-27 14:14:52

hola a Todos! Levanto en el servidor de un proyecto en Python + Flask + MySQL, se han instalado todos los importados módulos y se enfrentó con el siguiente problema: al iniciar la aplicación, obteniendo al final un error

/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.assets is deprecated, use flask_assets instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py:800: UserWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True to suppress this warning.
  warnings.warn('SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True to suppress this warning.')
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin is deprecated, use flask_admin instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.contrib is deprecated, use flask_admin.contrib instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.contrib.fileadmin is deprecated, use flask_admin.contrib.fileadmin instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.contrib.sqlamodel is deprecated, use flask_admin.contrib.sqlamodel instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_admin/contrib/sqlamodel/__init__.py:3: UserWarning: Flask-Admin sqlalchemy integration module was renamed as flask_admin.contrib.sqla, please use it instead.
  warnings.warn('Flask-Admin sqlalchemy integration module was renamed as flask_admin.contrib.sqla, please use it instead.')
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.babel is deprecated, use flask_admin.babel instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.actions is deprecated, use flask_admin.actions instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.helpers is deprecated, use flask_admin.helpers instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.model is deprecated, use flask_admin.model instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.model.helpers is deprecated, use flask_admin.model.helpers instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.base is deprecated, use flask_admin.base instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.admin.form is deprecated, use flask_admin.form instead.
  .format(x=modname), ExtDeprecationWarning
/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_admin/model/base.py:980: UserWarning: Property excluded_list_columns is obsolete, please use column_exclude_list instead
  excluded_columns=self.column_exclude_list,
Traceback (most recent call last):
  File "main.py", line 5, in <module>
    import admin, admin_views
  File "/home/n/notfallen/public_html/core/admin_views.py", line 329, in <module>
    admin.add_view(OrderBookView(OrderBookModel, db.session, name=u'Заказы -> Даты', category=u'Заказы'))
  File "/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 318, in __init__
    menu_icon_value=menu_icon_value)
  File "/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_admin/model/base.py", line 771, in __init__
    self._refresh_cache()
  File "/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_admin/model/base.py", line 848, in _refresh_cache
    self._sortable_columns = self.get_sortable_columns()
  File "/home/n/notfallen/myenv/local/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 486, in get_sortable_columns
    "Failed on: {0}".format(c))
Exception: For sorting columns in a related table, column_sortable_list requires a string like '<relation name>.<column name>'. Failed on: ('date', <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x1b349b0>)


A que esto puede ser debido? Como en esta medida puede afectar?:)

Total answers: 1

sim3x 2016-09-27 14:32:22

9949a8afed8746b1a338767a206b24f3.png

yo espero que mi sugerencia de que publicar el texto de una imagen - mal (muy)

notfallen 2016-09-27 14:43:27

la Alusión es claro:)


sim3x 2016-09-27 14:46:44

notfallen: apenas стектрейс es necesario copiar todo el
Desde el principio hasta el final

En стектрейсе te dijeron en qué línea usted tiene un problema y que


Preguntas relacionadas:

Footer decor

© www.state-it.info | Base of answers to questions for developers and programmers.