Travis角色无法启动任何令牌Django应用程序

2024-09-25 08:41:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将Travis CI集成到我的django应用程序中,并将其与heorku连接,这不是我第一次这样做,但这是我第一次面对这个错误,我不明白他为什么要抱怨travis.yml文件中的python版本,请注意,我在yml文件中使用空格,而不是tabs。你知道吗

我的travis.yml文件是:

language: python

python:
    - "3.4"

# command to install dependencies
install:
    - pip install -r requirements.txt

# command to tun tests
script: pytest

我正在从终端调用travis setup heorku命令,该命令需要将herokuapi键添加到我的yml文件中,结果如下

found character that cannot start any token while scanning for the next token at line 4 column 1

我试过用这个命令来travis encrypt $(heroku auth:token) --add deploy.api_key但是同样的事情发生了

特拉维斯的记录表显示了这一点

Worker information

hostname: i-14252cec-precise-production-2-worker-org-docker.travisci.net:4291b6eb-e316-4075-a109-f26333325746

version: v2.5.0-8-g19ea9c2 https://github.com/travis-ci/worker/tree/19ea9c20425c78100500c7cc935892b47024922c

instance: 9ea3797:travis:ruby

startup: 504.511181ms

Could not find .travis.yml, using standard configuration.
system_info

Build system information

Build language: ruby

Build group: stable

Build dist: precise

Build id: 181076246

Job id: 181076247

travis-build version: 557e4084f

Build image provisioning date and time

Thu Feb  5 15:09:33 UTC 2015

Operating System Details

Distributor ID: Ubuntu

Description:    Ubuntu 12.04.5 LTS

Release:    12.04

Codename:   precise

Linux Version

3.13.0-29-generic

Cookbooks Version

a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e

GCC version

gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

Copyright (C) 2011 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

LLVM version

clang version 3.4 (tags/RELEASE_34/final)

Target: x86_64-unknown-linux-gnu

Thread model: posix

Pre-installed Ruby versions

ruby-1.9.3-p551

Pre-installed Node.js versions

v0.10.36

Pre-installed Go versions

1.4.1

Redis version

redis-server 2.8.19

riak version

2.0.2

mMongoDB version

MongoDB 2.4.12

CouchDB version

couchdb 1.6.1

Neo4j version

1.9.4

RabbitMQ Version

3.4.3

ElasticSearch version

1.4.0

Installed Sphinx versions

2.0.10

2.1.9

2.2.6

Default Sphinx version

2.2.6

Installed Firefox version

firefox 31.0esr

PhantomJS version

1.9.8

ant -version

Apache Ant(TM) version 1.8.2 compiled on December 3 2011

mvn -version

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)

Maven home: /usr/local/maven

Java version: 1.7.0_76, vendor: Oracle Corporation

Java home: /usr/lib/jvm/java-7-oracle/jre

Default locale: en_US, platform encoding: ANSI_X3.4-1968

OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"

fix.CVE-2015-7547

$ export DEBIAN_FRONTEND=noninteractive

W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-amd64_Packages.gz is not what the server reported 13782 14904

W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages.gz is not what the server reported 13751 14885

W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-amd64_Packages.gz is not what the server reported 19576 20785

W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages.gz is not what the server reported 19521 20707

W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_source_Sources.gz is not what the server reported 5886 5888

W: Size of file /var/lib/apt/lists/ppa.launchpad.net_travis-ci_zero-mq_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 832 1195

W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 33653 36677

W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-i386_Packages.gz is not what the server reported 33699 36733

Reading package lists...

Building dependency tree...

Reading state information...

The following extra packages will be installed:

  libc-bin libc-dev-bin libc6-dev

Suggested packages:

  glibc-doc

The following packages will be upgraded:

  libc-bin libc-dev-bin libc6 libc6-dev

4 upgraded, 0 newly installed, 0 to remove and 266 not upgraded.

Need to get 8,840 kB of archives.

After this operation, 14.3 kB disk space will be freed.

Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.15 [2,943 kB]

Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.15 [84.7 kB]

Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-bin amd64 2.15-0ubuntu10.15 [1,177 kB]

Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6 amd64 2.15-0ubuntu10.15 [4,636 kB]

Fetched 8,840 kB in 0s (36.2 MB/s)

Preconfiguring packages ...

(Reading database ... 71420 files and directories currently installed.)

Preparing to replace libc6-dev 2.15-0ubuntu10.10 (using .../libc6-dev_2.15-0ubuntu10.15_amd64.deb) ...

Unpacking replacement libc6-dev ...

Preparing to replace libc-dev-bin 2.15-0ubuntu10.10 (using .../libc-dev-bin_2.15-0ubuntu10.15_amd64.deb) ...

Unpacking replacement libc-dev-bin ...

Preparing to replace libc-bin 2.15-0ubuntu10.10 (using .../libc-bin_2.15-0ubuntu10.15_amd64.deb) ...

Unpacking replacement libc-bin ...

Processing triggers for man-db ...

Setting up libc-bin (2.15-0ubuntu10.15) ...

(Reading database ... 71419 files and directories currently installed.)

Preparing to replace libc6 2.15-0ubuntu10.10 (using .../libc6_2.15-0ubuntu10.15_amd64.deb) ...

Unpacking replacement libc6 ...

Setting up libc6 (2.15-0ubuntu10.15) ...

Setting up libc-dev-bin (2.15-0ubuntu10.15) ...

Setting up libc6-dev (2.15-0ubuntu10.15) ...

Processing triggers for libc-bin ...

ldconfig deferred processing now taking place
git.checkout

0.87s$ git clone --depth=50 --branch=master https://github.com/Copser/supervisor.git Copser/supervisor

Cloning into 'Copser/supervisor'...

remote: Counting objects: 935, done.

remote: Compressing objectremote: Compressing objects: 100% (408/408), done.

remote: Total 935 (delta 609), reused 832 (delta 519), pack-reused 0

ReReceiving objects: 100% (935/935), 7.13 MiB | 0 bytes/s, done.

Resolving deltas: 100% (609/609), done.

Checking connectivity... done.

$ cd Copser/supervisor

$ git checkout -qf ed7591dc0733f616ded644501ee48ecb90d0da15

This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.

If you require sudo, add 'sudo: required' to your .travis.yml

See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
rvm

0.13s$ rvm use default

Using /home/travis/.rvm/gems/ruby-1.9.3-p551

$ ruby --version

ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]

$ rvm --version

rvm 1.26.10 (latest-minor) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

$ bundle --version

Bundler version 1.7.6

$ gem --version

2.4.5

0.12s$ rake

rake aborted!

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'

/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'

(See full trace by running task with --trace)

The command "rake" exited with 1.

Done. Your build exited with 1.

有人能告诉我发生了什么事,我怎么能过去吗?你知道吗


Tags: ofthedevcomtravisbinisversion
1条回答
网友
1楼 · 发布于 2024-09-25 08:41:28

我对yaml配置的看法是错误的

note that I'm using spaces in yml file, rather then tabs.

我又错了,我用的是tabs,最终我用Travis WebLint解决了这个问题,我只是验证了我的yaml文件,发现我是瞎子,所以验证,它有帮助。你知道吗

相关问题 更多 >