Skip to content
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

AttributeError: 'NoneType' object has no attribute 'group' #18

Closed
chaihuoa opened this issue Nov 8, 2017 · 4 comments
Closed

AttributeError: 'NoneType' object has no attribute 'group' #18

chaihuoa opened this issue Nov 8, 2017 · 4 comments

Comments

@chaihuoa
Copy link

chaihuoa commented Nov 8, 2017

I got the following log when I ran 'git pullrequest create sourceBranch destBranch' command, please help me to take a look.

Traceback (most recent call last):
  File "/usr/local/bin/git-pullrequest", line 9, in <module>
    load_entry_point('git-ext==0.5.0', 'console_scripts', 'git-pullrequest')()
  File "/Library/Python/2.7/site-packages/git_ext/bin/pullrequest.py", line 110, in main
    pullrequests(obj={})
  File "/Library/Python/2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Library/Python/2.7/site-packages/git_ext/bin/pullrequest.py", line 30, in pullrequests
    ctx.obj['remote'] = get_remote()
  File "/Library/Python/2.7/site-packages/git_ext/bin/pullrequest.py", line 24, in get_remote
    return BitbucketRemote()
  File "/Library/Python/2.7/site-packages/git_ext/bitbucket.py", line 31, in __init__
    super(BitbucketRemote, self).__init__(get_bitbucket_user())
  File "/Library/Python/2.7/site-packages/git_ext/__init__.py", line 80, in __init__
    self.repo_username, self.repo_name = get_repo_slug()
  File "/Library/Python/2.7/site-packages/git_ext/git.py", line 55, in get_repo_slug
    username = matcher.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
@laixintao
Copy link
Owner

@BraveMatchstickMen Hi,

Can you paste your .git/config ? Your remote information stores here.

cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = [email protected]:deepanalyzer/yorg.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[flake8]
        strict = true

@chaihuoa
Copy link
Author

chaihuoa commented Nov 8, 2017

@laixintao Hi, here's my .git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = ssh://[email protected]/mob/ios-bbspecs.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "3.2.2.5"]
        remote = origin
        merge = refs/heads/3.2.2.5

@laixintao
Copy link
Owner

@BraveMatchstickMen I'm sorry this script now support bitbucket only. I'm currently working on #7 and #8 .

It basically works by sending HTTPS request to bitbucket server via RESU api. It's not a part of git's function.

@chaihuoa
Copy link
Author

chaihuoa commented Nov 8, 2017

@laixintao well, it's my fault, I was wrong to think that gitbucket and stash were the same. Thanks for your response, I'll close this issue.

@chaihuoa chaihuoa closed this as completed Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants