Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Not be able to submit the code, get URL incorrect issue #13

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

Closed
zhouchenzc0824 opened this issue May 11, 2018 · 4 comments
Closed

Not be able to submit the code, get URL incorrect issue #13

zhouchenzc0824 opened this issue May 11, 2018 · 4 comments
Labels

Comments

@zhouchenzc0824
Copy link

[zhouchen@macbook lc]$leetcode submit 144.binary-tree-preorder-traversal.java -vv
[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] inited plugin: cache
[TRACE] found plugin: company=2017.12.18
[TRACE] inited plugin: company
[TRACE] found plugin: github=2018.03.24
[TRACE] inited plugin: github
[TRACE] found plugin: leetcode=default
[TRACE] inited plugin: leetcode
`[TRACE] found plugin: retry=default
[TRACE] inited plugin: retry
[TRACE] found plugin: solution.discuss=2018.04.14
[TRACE] inited plugin: solution.discuss
[TRACE] missing plugins: 0
[DEBUG] cache hit: problems.json
[DEBUG] cache hit: 144.binary-tree-preorder-traversal.algorithms.json
/usr/local/lib/node_modules/leetcode-cli/node_modules/yargs/yargs.js:1100
      else throw err
           ^

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined
    at Url.parse (url.js:143:11)
    at Object.urlParse [as parse] (url.js:137:13)
    at Plugin.plugin.submitProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/github.js:20:19)
    at /usr/local/lib/node_modules/leetcode-cli/lib/commands/submit.js:58:10
    at /usr/local/lib/node_modules/leetcode-cli/lib/plugins/solution.discuss.js:81:45
    at Plugin.plugin.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:38:12)
    at Plugin.plugin.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/solution.discuss.js:80:15)
    at /usr/local/lib/node_modules/leetcode-cli/lib/core.js:95:15
    at /usr/local/lib/node_modules/leetcode-cli/lib/plugins/company.js:1176:12
    at Plugin.plugin.getProblems (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:21:12)```



> I can test, cache, show any problem but submit. <
@skygragon
Copy link
Owner

Seems your don't have a valid config for github plugin? see https://github.com/skygragon/leetcode-cli-plugins/blob/master/docs/github.md

skygragon added a commit that referenced this issue May 14, 2018
refs #13

Signed-off-by: Eric Wang <skygragon@gmail.com>
@zhouchenzc0824
Copy link
Author

Actually I had the config for github plugin which wont work. Then I regenerate the new token and different repo git. Now it works with error message though:

✘ {"message":"Not Found","documentation_url":"https://developer.github.com/v3/repos/contents/#update-a-file"}

looked like it cannot create the files in github.

@skygragon
Copy link
Owner

@zhouchenzc0824 would you mind paste your repo config here? Sounds like an invalid url path of the repo. btw my repo is configured like:

# ./bin/leetcode cfg plugins:github
{
  "token": "<hidden>",
  "repo": "https://github.com/skygragon/Q.solution/leetcode"
}

@zhouchenzc0824
Copy link
Author

Everything is fine now, the repo name has a typo, My bad. Impressive project, thanks for sharing.

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

No branches or pull requests

2 participants