收藏
回答

命令行 上传版本 报错,请大神帮忙

问题模块 框架类型 问题类型 操作系统 工具版本
开发者工具 小程序 Bug macOS 1.02.1902010

- 当前 Bug 的表现(可附上截图)

1.使用mac终端行执行命令:

/Applications/wechatwebdevtools.app/Contents/MacOS/cli -u 1.4.2.12@/Users/liushaoyi/testJsonForId/weixin_xiaomaiquan --upload-desc 'version1.4.2.12ceshi' --preview-info-output /Users/liushaoyi/testJsonForId/versioninfo.text

结果完美上传

2.使用python3 执行同样的命令报错:

Initializing...

idePortFile: /Users/liushaoyi/Library/Application Support/微信web开发者工具/Default/.ide

IDE server has started, listening on http://127.0.0.1:34362

initialization finished

Initializing...

idePortFile: /Users/liushaoyi/Library/Application Support/微信web开发者工具/Default/.ide

IDE server has started, listening on http://127.0.0.1:34362

initialization finished

uploading project...

{ StatusCodeError: 400 - "{\"code\":40000,\"error\":\"错误 Error: undefined\\nExpecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[', got EOF\\n  1 | \"}"

    at new StatusCodeError (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/request-promise-core/lib/errors.js:32:15)

    at Request.plumbing.callback (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/request-promise-core/lib/plumbing.js:104:33)

    at Request.RP$callback [as _callback] (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/request-promise-core/lib/plumbing.js:46:31)

    at Request.self.callback (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/request/request.js:188:22)

    at emitTwo (events.js:125:13)

    at Request.emit (events.js:213:7)

    at Request.<anonymous> (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/request/request.js:1171:10)

    at emitOne (events.js:115:13)

    at Request.emit (events.js:210:7)

    at IncomingMessage.<anonymous> (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/request/request.js:1091:12)

  name: 'StatusCodeError',

  statusCode: 400,

  message: '400 - "{\\"code\\":40000,\\"error\\":\\"错误 Error: undefined\\\\nExpecting \'STRING\',\'NUMBER\',\'NULL\',\'TRUE\',\'FALSE\',\'{\',\'[\', got EOF\\\\n  1 | \\"}"',

  error: '{"code":40000,"error":"错误 Error: undefined\\nExpecting \'STRING\',\'NUMBER\',\'NULL\',\'TRUE\',\'FALSE\',\'{\',\'[\', got EOF\\n  1 | "}',

  options:

   { url: 'http://127.0.0.1:34362/upload?cli=1&projectpath=%252FUsers%252Fliushaoyi%252FtestJsonForId%252Fweixin_xiaomaiquan&version=1.4.2.14&desc=version1.4.2.14ceshi&infooutput=',

     resolveWithFullResponse: true,

     callback: [Function: RP$callback],

     transform: undefined,

     simple: true,

     transform2xxOnly: false },

  response:

   IncomingMessage {

     _readableState:

      ReadableState {

        objectMode: false,

        highWaterMark: 16384,

        buffer: [Object],

        length: 0,

        pipes: null,

        pipesCount: 0,

        flowing: true,

        ended: true,

        endEmitted: true,

        reading: false,

        sync: true,

        needReadable: false,

        emittedReadable: false,

        readableListening: false,

        resumeScheduled: false,

        destroyed: false,

        defaultEncoding: 'utf8',

        awaitDrain: 0,

        readingMore: false,

        decoder: null,

        encoding: null },

     readable: false,

     domain: null,

     _events:

      { end: [Array],

        close: [Array],

        data: [Function],

        error: [Function] },

     _eventsCount: 4,

     _maxListeners: undefined,

     socket:

      Socket {

        connecting: false,

        _hadError: false,

        _handle: null,

        _parent: null,

        _host: null,

        _readableState: [Object],

        readable: false,

        domain: null,

        _events: [Object],

        _eventsCount: 8,

        _maxListeners: undefined,

        _writableState: [Object],

        writable: false,

        allowHalfOpen: false,

        _bytesDispatched: 205,

        _sockname: null,

        _pendingData: null,

        _pendingEncoding: '',

        server: null,

        _server: null,

        parser: null,

        _httpMessage: [Object],

        read: [Function],

        _consuming: true,

        _idleNext: null,

        _idlePrev: null,

        _idleTimeout: -1,

        [Symbol(asyncId)]: 41,

        [Symbol(bytesRead)]: 295 },

     connection:

      Socket {

        connecting: false,

        _hadError: false,

        _handle: null,

        _parent: null,

        _host: null,

        _readableState: [Object],

        readable: false,

        domain: null,

        _events: [Object],

        _eventsCount: 8,

        _maxListeners: undefined,

        _writableState: [Object],

        writable: false,

        allowHalfOpen: false,

        _bytesDispatched: 205,

        _sockname: null,

        _pendingData: null,

        _pendingEncoding: '',

        server: null,

        _server: null,

        parser: null,

        _httpMessage: [Object],

        read: [Function],

        _consuming: true,

        _idleNext: null,

        _idlePrev: null,

        _idleTimeout: -1,

        [Symbol(asyncId)]: 41,

        [Symbol(bytesRead)]: 295 },

     httpVersionMajor: 1,

     httpVersionMinor: 1,

     httpVersion: '1.1',

     complete: true,

     headers:

      { 'content-type': 'application/json;  charset=utf-8',

        date: 'Fri, 22 Feb 2019 13:10:12 GMT',

        connection: 'close',

        'transfer-encoding': 'chunked' },

     rawHeaders:

      [ 'Content-Type',

        'application/json;  charset=utf-8',

        'Date',

        'Fri, 22 Feb 2019 13:10:12 GMT',

        'Connection',

        'close',

        'Transfer-Encoding',

        'chunked' ],

     trailers: {},

     rawTrailers: [],

     upgrade: false,

     url: '',

     method: null,

     statusCode: 400,

     statusMessage: 'Bad Request',

     client:

      Socket {

        connecting: false,

        _hadError: false,

        _handle: null,

        _parent: null,

        _host: null,

        _readableState: [Object],

        readable: false,

        domain: null,

        _events: [Object],

        _eventsCount: 8,

        _maxListeners: undefined,

        _writableState: [Object],

        writable: false,

        allowHalfOpen: false,

        _bytesDispatched: 205,

        _sockname: null,

        _pendingData: null,

        _pendingEncoding: '',

        server: null,

        _server: null,

        parser: null,

        _httpMessage: [Object],

        read: [Function],

        _consuming: true,

        _idleNext: null,

        _idlePrev: null,

        _idleTimeout: -1,

        [Symbol(asyncId)]: 41,

        [Symbol(bytesRead)]: 295 },

     _consuming: true,

     _dumped: false,

     req:

      ClientRequest {

        domain: null,

        _events: [Object],

        _eventsCount: 5,

        _maxListeners: undefined,

        output: [],

        outputEncodings: [],

        outputCallbacks: [],

        outputSize: 0,

        writable: true,

        _last: true,

        upgrading: false,

        chunkedEncoding: false,

        shouldKeepAlive: false,

        useChunkedEncodingByDefault: false,

        sendDate: false,

        _removedConnection: false,

        _removedContLen: false,

        _removedTE: false,

        _contentLength: 0,

        _hasBody: true,

        _trailer: '',

        finished: true,

        _headerSent: true,

        socket: [Object],

        connection: [Object],

        _header: 'GET /upload?cli=1&projectpath=%252FUsers%252Fliushaoyi%252FtestJsonForId%252Fweixin_xiaomaiquan&version=1.4.2.14&desc=version1.4.2.14ceshi&infooutput= HTTP/1.1\r\nhost: 127.0.0.1:34362\r\nConnection: close\r\n\r\n',

        _onPendingData: [Function: noopPendingOutput],

        agent: [Object],

        socketPath: undefined,

        timeout: undefined,

        method: 'GET',

        path: '/upload?cli=1&projectpath=%252FUsers%252Fliushaoyi%252FtestJsonForId%252Fweixin_xiaomaiquan&version=1.4.2.14&desc=version1.4.2.14ceshi&infooutput=',

        _ended: true,

        res: [Circular],

        aborted: undefined,

        timeoutCb: null,

        upgradeOrConnect: false,

        parser: null,

        maxHeadersCount: null,

        [Symbol(outHeadersKey)]: [Object] },

     request:

      Request {

        domain: null,

        _events: [Object],

        _eventsCount: 5,

        _maxListeners: undefined,

        resolveWithFullResponse: true,

        readable: true,

        writable: true,

        _qs: [Object],

        _auth: [Object],

        _oauth: [Object],

        _multipart: [Object],

        _redirect: [Object],

        _tunnel: [Object],

        _rp_resolve: [Function],

        _rp_reject: [Function],

        _rp_promise: [Object],

        _rp_callbackOrig: undefined,

        callback: [Function],

        _rp_options: [Object],

        headers: {},

        setHeader: [Function],

        hasHeader: [Function],

        getHeader: [Function],

        removeHeader: [Function],

        method: 'GET',

        localAddress: undefined,

        pool: {},

        dests: [],

        __isRequestRequest: true,

        _callback: [Function: RP$callback],

        uri: [Object],

        proxy: null,

        tunnel: false,

        setHost: true,

        originalCookieHeader: undefined,

        _disableCookies: true,

        _jar: undefined,

        port: '34362',

        host: '127.0.0.1',

        path: '/upload?cli=1&projectpath=%252FUsers%252Fliushaoyi%252FtestJsonForId%252Fweixin_xiaomaiquan&version=1.4.2.14&desc=version1.4.2.14ceshi&infooutput=',

        httpModule: [Object],

        agentClass: [Object],

        agent: [Object],

        _started: true,

        href: 'http://127.0.0.1:34362/upload?cli=1&projectpath=%252FUsers%252Fliushaoyi%252FtestJsonForId%252Fweixin_xiaomaiquan&version=1.4.2.14&desc=version1.4.2.14ceshi&infooutput=',

        req: [Object],

        ntick: true,

        response: [Circular],

        originalHost: '127.0.0.1:34362',

        originalHostHeaderName: 'host',

        responseContent: [Circular],

        _destdata: true,

        _ended: true,

        _callbackCalled: true },

     toJSON: [Function: responseToJSON],

     caseless: Caseless { dict: [Object] },

     read: [Function],

     body: '{"code":40000,"error":"错误 Error: undefined\\nExpecting \'STRING\',\'NUMBER\',\'NULL\',\'TRUE\',\'FALSE\',\'{\',\'[\', got EOF\\n  1 | "}' } }


最后一次编辑于  02-22  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答