在那里,在我的项目中使用travis-ci时遇到了“分段错误”错误:IPython-Dashboard

msg没有错误,并且在本地运行良好,我感到有些困惑。任何人都可以提出解决问题的任何想法,谢谢。



这是在云上的travis构建日志:

travis-log

$ nosetests --with-coverage --cover-package=dashboard

../home/travis/build.sh: line 45:  3187 Segmentation fault      (core dumped)
nosetests --with-coverage --cover-package=dashboard

The command "nosetests --with-coverage --cover-package=dashboard" exited with 139.




这是本地[osx]上的构建日志

taotao@mac007:~/Desktop/github/IPython-Dashboard$sudo nosetests --with-coverage --cover-package=dashboard
.../Users/chenshan/Desktop/github/IPython-Dashboard/dashboard/tests/testCreateData.py:78: Warning: Can't create database 'IPD_data'; database exists
  conn.cursor().execute('CREATE DATABASE IF NOT EXISTS {};'.format(config.sql_db))
/Library/Python/2.7/site-packages/pandas/io/sql.py:599: FutureWarning: The 'mysql' flavor with DBAPI connection is deprecated and will be removed in future versions. MySQL will be further supported with SQLAlchemy engines.
  warnings.warn(_MYSQL_WARNING, FutureWarning)
...
Name                                    Stmts   Miss  Cover   Missing
---------------------------------------------------------------------
dashboard.py                               13      0   100%
dashboard/client.py                         1      0   100%
dashboard/client/sender.py                 11      3    73%   26-27, 33
dashboard/conf.py                           0      0   100%
dashboard/conf/config.py                   29      0   100%
dashboard/server.py                         0      0   100%
dashboard/server/resources.py               0      0   100%
dashboard/server/resources/dash.py         35     10    71%   36, 55-56, 67-69, 86-89
dashboard/server/resources/home.py         40     12    70%   25, 28-30, 83-91
dashboard/server/resources/sql.py          27     11    59%   30, 52-75
dashboard/server/resources/status.py        8      1    88%   19
dashboard/server/resources/storage.py      13      5    62%   26-28, 43-47
dashboard/server/utils.py                  79     18    77%   20-24, 78-80, 82-83, 86, 96, 99-100, 126-127, 140-142
dashboard/server/views.py                  21      1    95%   16
---------------------------------------------------------------------
TOTAL                                     277     61    78%
----------------------------------------------------------------------
Ran 6 tests in 4.600s

OK
taotao@mac007:~/Desktop/github/IPython-Dashboard$

最佳答案

按照此issue升级travis测试中的sqlite会有所帮助。
在3.12.1之前的SQLite版本中,存在导致分段错误的错误
这是您关于此问题的article

将以下配置添加到travis.xml

addons:
  apt:
    packages:
    - sqlite3
    sources:
    - travis-ci/sqlite3

关于travis-ci - travis“段错误”,但在本地运行良好,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34544445/

10-16 10:56