views:

1201

answers:

8

I am not able to get the repository for core-plot. What I am doing is that I am typing this in the terminal:

hg clone https://core-plot.googlecode.com/hg/ core-plot

and this is what I get:

Traceback (most recent call last):

File "/usr/local/bin/hg", line 25, in 
mercurial.util.set_binary(fp)

File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()

File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 47, in _load
    mod = _origimport(head, globals, locals)


  File "/Library/Python/2.5/site-packages/mercurial/util.py", line 93, in 
    _encoding = locale.getlocale()[1]

  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 460, in getlocale
    return _parse_localename(localename)

  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 373, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename

ValueError: unknown locale: UTF-8

I can't seem to get it to install. Please give me guidance on how to install the repository.

+1  A: 

Have you installed Mercurial on your computer? If not, you can download an installer here: http://mercurial.berkwood.com/

Dave DeLong
I did. Then I typed the code in the terminal. Am I right. I am following the tutorial http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application I can't find "CorePlot-CocoaTouch.xcodeproj"
Omar
Hey Dave, I have added to my question what i get when i type the command in the terminal. Please help.
Omar
A: 

The repository works perfectly fine:

↪ hg clone https://core-plot.googlecode.com/hg/ core-plot
requesting all changes
adding changesets
adding manifests
adding file changes
added 406 changesets with 3444 changes to 1861 files
updating working directory
1018 files updated, 0 files merged, 0 files removed, 0 files unresolved

So I suspect your problem is that hg isn't in your path, or you've not installed Mercurial. You should grab a copy of the installer, or install via your package management system (MacPorts, Apt, YUM etc.)

Nathan de Vries
I installed Mercurial. But when I type: hg clone https://core-plot.googlecode.com/hg/ core-plot in the terminal I don't get what you got.
Omar
@Omar what do you get instead? If you want an answer, you really need to be more forthcoming with helpful information. =)
Dave DeLong
+1  A: 

It looks like you're having a problem with your locale. Are you using Leopard? If so, check your Terminal preferences. In the Terminal prefs, open up the Settings pane, and click the Advanced tab. The "Character Encoding" menu should be set to "Unicode (UTF-8)". Also make sure that "Set LANG variable on startup" is checked.

You can check your locale setting by opening up the Terminal and typing echo $LANG. Mine returns en_US.UTF-8 (US English, UTF-8). Not sure what your preferred language is, but it should be <langcode>.UTF-8 -- make sure it ends with UTF-8.

mipadi
All the settings are as you have said. When I type "echo $LANG" nothing happens at all.
Omar
That could be an issue -- your $LANG environment variable _should_ be set. You can try setting it in your shell's startup script (~/.bashrc if you're using the default shell, bash); that can be done with export LANG=en_US.UTF-8. You can also enter that at a shell prompt, run hg again, and see if the issue is fixed.
mipadi
Now when I type "echo $LANG" I get what you got but when I run hg again, there is no difference.
Omar
A: 

It looks to me like you have a broken Python installation. However, since you're trying to get Mercurial working, please contact the Mercurial team through the correct channels. Use the

Doing so means that many more people see your problem and hopefully there will be someone who is using Mac who can help you (I'm using Debian and don't know what Apple has done to your Python installation...).

Martin Geisler
A: 

LANG can be overridden by HGENCODING. If "echo $HGENCODING" produces "UTF-8" that's your culprit. Unset it or set it to en_US.UTF-8 (or whatever language you prefer, but it should end in .UTF-8). You could also try setting HGENCODING or LANG to "C" if you have no need for non-ascii characters, or just as a test.

brendan
+1  A: 

See following question here,

http://stackoverflow.com/questions/1694539/how-to-create-line-chart-in-iphone-application/1717734#1717734

I have added my answer there for the same one.

sugar
A: 

Hi,

I am creating local copy of core plot repository using following command but it gives error,

hg clone https://core-plot.googlecode.com/hg/ core-plot

abort: error: Connection refused

Please suggest me solution.

Umesh Jagtap
A: 

I am also facing the same problem. Can someone help?

Krishnan