It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SourceTree 2.0.4 error

Robbie Dec 19, 2014

Since updating to version 2.0.4 of SourceTree this error appears on startup. "hg status" is failing causing information to not show up in the repository window.

'hg status' failed with code 1:'*** failed to import extension hgext.hgsubversion from /Applications/ 'module' object has no attribute 'canonpath'
** Unknown exception encountered with possibly-broken third-party extension hgattic
** which supports versions unknown of Mercurial.
** Please disable hgattic and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.5 (default, Mar  9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
** Mercurial Distributed SCM (version 3.2.3)
** Extensions loaded: purge, transplant, fetch, extdiff, rebase, strip, mq, hgattic, hgflow, gpg, sourcetree_auth, progress, sourcetree_checklink
Traceback (most recent call last):
  File "/Applications/", line 35, in <module>
  File "/Applications/", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/Applications/", line 71, in dispatch
    ret = _runcatch(req)
  File "/Applications/", line 140, in _runcatch
    return _dispatch(req)
  File "/Applications/", line 817, in _dispatch
    repo = hg.repository(ui, path=path)
  File "/Applications/", line 128, in repository
    peer = _peerorrepo(ui, path, create)
  File "/Applications/", line 115, in _peerorrepo
    obj = _peerlookup(path).instance(ui, path, create)
  File "/Applications/", line 89, in _peerlookup
    return thing(path)
  File "/Applications/", line 185, in _lookup
    if util.islocalrepo(url):
AttributeError: 'NoneType' object has no attribute 'islocalrepo'

17 answers

4 votes
Rp Subhub Dec 22, 2014

Looks a lot like SRCTREE-2878 

There's an update to blog post on release of 2.0.4 with details of the fix.

Alan Wright Dec 22, 2014

Un-checking the hgsubversion option worked for me. 2.0.4 now working!

Yosi Oren Dec 24, 2014

did not work for me. i can not even reach that option since it is out of screen, the mercurial error that display has no scroll option so the window become too large to reach.

Peter Tran Dec 25, 2014

Thanks for the work-around in the update to the blog post. :)

Guy Tidhar Dec 29, 2014

I have the same issue as Yosi had. Our project is stuck. Right when I need to download all the code to work. How can I fix this? The bitbucket is stuck with a window taller then the screen and no option to close it.

Guy Tidhar Dec 29, 2014

In case you have my issue and can not see the "OK" button at the bottom, you might need to change resolution (system preferences -> Displays -> Display Tab: "Scaled" resolution radio button : change it until you can see the button.

Yosi Oren Dec 29, 2014

Guy , software should have a scrollable view so it will not have this effect , but I guess they did not check if instead of version string there is a stack trace of crash. I can see that when i switch to system mercurial every thing is working ok with version 3.2.1 in the crash trace it specify that it can not work with python 2.6.9 because it was compiled with 2.7.5. python 2.6.9 is the default apple version while I have 2.7.8 installed for me , Sourcetree does not run with settings so it access the apple old version. How do I set my python 2.7.8 as the default for system wide apps ?

Yosi Oren Dec 29, 2014

google is my friend :) found the solution : in terminal write : defaults write Version 2.7 then embedded works

Guy Tidhar Dec 29, 2014

I was referring to a Mac version of sourcetree. Once I addressed the resolution not being enough to see closing button, following the uncheck hgsubversion fix did the trick for me.

Igor Stojanovic Jan 05, 2015

Un-checking the hgsubversion option worked for me as well.

0 votes
P Dec 19, 2014

Me too. Same error and blank window.

0 votes
Aaron Davidson Dec 20, 2014

Same problem here since updating to 2.0.4

0 votes
Alan Wright Dec 20, 2014

Same problem going form 2.0.2 to 2.0.4!

0 votes
Alan Wright Dec 20, 2014

Went back to 2.0.3 and error disappears. Phew!

0 votes
Andrew Butterfield Dec 21, 2014

I'm getting the same error - just updated to 2.0.4 - the git repos work OK, the mercurial ones re banjaxed, at least in sourcetree - hg log and hg status from the command line work just fine

0 votes
Alexander Kokuev Dec 21, 2014

Same thing on 2.0.4

0 votes
Ben Wagler Dec 21, 2014

Had the same issue with Sourcetree 2.0.3 using external mercurial 3.2.3 install No improvements since with 2.0.4, using either embedded or external mercurial install

0 votes
Ben Wagler Dec 21, 2014

Also found a temp fix by downgrading to 2.0.2 using embedded mercurial 2.2.2

0 votes
Kevin Lee Dec 21, 2014
0 votes
Kevin Lee Dec 21, 2014

Dear Atlassian, I appreciate your effort to quickly solve the security issue, yet I don't think making the app unusable is a proper solution.

0 votes
Uwe Honekamp Dec 21, 2014

Just to make this gain more momentum: same here, independently of whether internal or external (3.2.3+20141218) hg install is used. Command line client works fine. No issue with repos.

0 votes
Felix Ingram Dec 22, 2014

Same here. Will try a downgrade to 2.0.3

0 votes
Yiwen Ng Dec 22, 2014

Same here... downgrade to 2.0.3

0 votes
Chad Burris Dec 22, 2014

Thought it was just me, got this as soon as I upgraded to 2.0.4. Will be downgrading for now.

0 votes
Maks Rafalko Dec 24, 2014

Read the anser from @Rp Subhub - unchecking hgsubversion plugin is a fix

0 votes
Alexander Schatten Jan 08, 2015

same here and what is even better: the error window is to large that it is not possible to get to the ok/close/whatever button.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,851 views 13 18
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you