Cannot commit in mercurial repo - mercurial

I have a Mercuirial (3.6.1) project. Every time I try to commit I get the next error.
(project)➜ project hg:(default) ✗ hg commit -m "TICK-190" subfolder/models.py
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2]
** Mercurial Distributed SCM (version 3.6.1)
** Extensions loaded:
Traceback (most recent call last):
File "/home/django/project/bin/hg", line 43, in <module>
mercurial.dispatch.run()
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 54, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 116, in dispatch
ret = _runcatch(req)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 187, in _runcatch
return _dispatch(req)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 920, in _dispatch
cmdpats, cmdoptions)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 679, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/django/plantbid/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1051, in _runcommand
return checkargs()
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1011, in checkargs
return cmdfunc()
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 917, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/util.py", line 801, in check
return func(*args, **kwargs)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/commands.py", line 1584, in commit
node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/cmdutil.py", line 2491, in commit
return commitfunc(ui, repo, message, matcher, opts)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/project.py", line 1578, in commitfunc
extra=extra)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/localrepo.py", line 64, in wrapper
return orig(repo.unfiltered(), *args, **kwargs)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/localrepo.py", line 1550, in commit
allowemptycommit = (wctx.branch() != wctx.p1().branch()
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/context.py", line 533, in branch
return encoding.tolocal(self._changeset[5].get("branch"))
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/util.py", line 534, in __get__
result = self.func(obj)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/context.py", line 502, in _changeset
return self._repo.changelog.read(self.rev())
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/changelog.py", line 338, in read
text = self.revision(node)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 1110, in revision
bins = self._chunks(chain, df=_df)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 1015, in _chunks
self._chunkraw(revs[0], revs[-1], df=df)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 990, in _chunkraw
return self._getchunk(start, length, df=df)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 981, in _getchunk
return self._loadchunk(offset, length, df=df)
File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 966, in _loadchunk
return util.buffer(d, offset - realoffset, length)
ValueError: size must be zero or positive
There's no much more detail I can explain. I was commiting my code without problems and suddenly this error started to show. I cannot commit any file. I can ask gor hg status with no problem.
Since this is a legacy project I've recently got, I want to make as little changes as possible.
UPDATE:
hg verify
repository uses revlog format 1
checking changesets
changelog#?: data length off by 1066185 bytes
changelog#?: rev 6801 points to nonexistent changeset -1
(expected 6801)
6802: unpacking changeset b087b38d690d: revlog decompress error: Error -5 while decompressing data: incomplete or truncated stream
checking manifests
manifest#?: data length off by 1894563 bytes
manifest#?: rev 6729 points to nonexistent changeset -1
manifest#?: 000000000000 not in changesets
manifest#?: rev 6730 points to unexpected changeset 6802
manifest#?: 9363dc75d5fb not in changesets
?: reading manifest delta 9363dc75d5fb: revlog decompress error: Error -5 while decompressing data: incomplete or truncated stream
crosschecking files in changesets and manifests
checking files
plantbid/templates/rfp_edit_nursery_responses3.html#?: rev 8 points to unexpected changeset 6802
(expected )
plantbid/templates/rfp_edit_nursery_responses3.html#?: 7e15c24e6859 not in manifests
plantrfp/views.py#4684: broken revlog! (index data/plantrfp/views.py.i is corrupted)
warning: orphan revlog 'data/plantrfp/views.py.i'
2266 files, 6803 changesets, 13181 total revisions
3 warnings encountered!
12 integrity errors encountered!
(first damaged changeset appears to be 4684)

You may have found a bug in Mercurial, but try updating to the latest Mercurial version (3.9) first before you file a bug report. https://www.mercurial-scm.org
Re:Update: That looks like your repository is faulty. Maybe your hard drive has errors? Is this the only copy of the repository, or is there another one somewhere else? You best bet is probably to try and find a non-broken copy.

Related

Having "make_aware expects a naive datetime" while migrate

I have developed an application with Django.
This is working fine in my PC with sqlite backend.
But when I am trying to go live with linux server and mysql backend then I am getting bellow error while first time migration.
(env-bulkmailer) [root#localhost bulkmailer]# python3 manage.py migrate
Traceback (most recent call last):
File "/var/www/bulkmailer-folder/bulkmailer/manage.py", line 22, in <module>
main()
File "/var/www/bulkmailer-folder/bulkmailer/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/core/management/base.py", line 96, in wrapped
res = handle_func(*args, **kwargs)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/core/management/commands/migrate.py", line 114, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 18, in __init__
self.loader = MigrationLoader(self.connection)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/migrations/loader.py", line 58, in __init__
self.build_graph()
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/migrations/loader.py", line 235, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/migrations/recorder.py", line 82, in applied_migrations
return {
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/models/query.py", line 394, in __iter__
self._fetch_all()
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/models/query.py", line 1866, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/models/query.py", line 117, in __iter__
for row in compiler.results_iter(results):
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/models/sql/compiler.py", line 1336, in apply_converters
value = converter(value, expression, connection)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/db/backends/mysql/operations.py", line 331, in convert_datetimefield_value
value = timezone.make_aware(value, self.connection.timezone)
File "/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/utils/timezone.py", line 291, in make_aware
raise ValueError("make_aware expects a naive datetime, got %s" % value)
ValueError: make_aware expects a naive datetime, got 2022-11-20 12:39:18.866299+00:00
In settings-
USE_TZ = True
I have run mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql also as django doc.
I am using django 4.1.3 and mysql community 8.0.30
Thanks in advance.
Ran into the same issue. At some point, django assumes that the the data is timezone-naive without checking. Here's the work-around.
Update the make_aware function that is listed in your stack trace here:
/var/www/bulkmailer-folder/env-bulkmailer/lib64/python3.9/site-packages/django/utils/timezone.py", line 291, in make_aware
Instead of raising an error if the value is already aware, just return the aware value. See the last else statement below.
def make_aware(value, timezone=None, is_dst=NOT_PASSED):
"""Make a naive datetime.datetime in a given time zone aware."""
if is_dst is NOT_PASSED:
is_dst = None
else:
warnings.warn(
"The is_dst argument to make_aware(), used by the Trunc() "
"database functions and QuerySet.datetimes(), is deprecated as it "
"has no effect with zoneinfo time zones.",
RemovedInDjango50Warning,
)
if timezone is None:
timezone = get_current_timezone()
if _is_pytz_zone(timezone):
# This method is available for pytz time zones.
return timezone.localize(value, is_dst=is_dst)
else:
# Check that we won't overwrite the timezone of an aware datetime.
if is_aware(value):
# ADD THIS
return value
# REMOVE THE FOLLOWING LINE
# raise ValueError("make_aware expects a naive datetime, got %s" % value)
# This may be wrong around DST changes!
return value.replace(tzinfo=timezone)

How to resolve coreferences without Internet using AllenNLP and coref-spanbert-large?

A want to resolve coreferences without Internet using AllenNLP and coref-spanbert-large model.
I try to do it in the way that is describing here https://demo.allennlp.org/coreference-resolution
My code:
from allennlp.predictors.predictor import Predictor
import allennlp_models.tagging
predictor = Predictor.from_path(r"C:\Users\aap\Desktop\coref-spanbert-large-2021.03.10.tar.gz")
example = 'Paul Allen was born on January 21, 1953, in Seattle, Washington, to Kenneth Sam Allen and Edna Faye Allen.Allen attended Lakeside School, a private school in Seattle, where he befriended Bill Gates, two years younger, with whom he shared an enthusiasm for computers.'
pred = predictor.predict(document=example)
coref_res = predictor.coref_resolved(example)
print(pred)
print(coref_res)
When I have an access to internet the code works correctly.
But when I don't have an access to internet I get the following errors:
Traceback (most recent call last):
File "C:/Users/aap/Desktop/CoreNLP/Coref_AllenNLP.py", line 14, in <module>
predictor = Predictor.from_path(r"C:\Users\aap\Desktop\coref-spanbert-large-2021.03.10.tar.gz")
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\predictors\predictor.py", line 361, in from_path
load_archive(archive_path, cuda_device=cuda_device, overrides=overrides),
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\models\archival.py", line 206, in load_archive
config.duplicate(), serialization_dir
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\models\archival.py", line 232, in _load_dataset_readers
dataset_reader_params, serialization_dir=serialization_dir
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 604, in from_params
**extras,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 632, in from_params
kwargs = create_kwargs(constructor_to_inspect, cls, params, **extras)
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 200, in create_kwargs
cls.__name__, param_name, annotation, param.default, params, **extras
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 307, in pop_and_construct_arg
return construct_arg(class_name, name, popped_params, annotation, default, **extras)
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 391, in construct_arg
**extras,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 341, in construct_arg
return annotation.from_params(params=popped_params, **subextras)
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 604, in from_params
**extras,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\from_params.py", line 634, in from_params
return constructor_to_call(**kwargs) # type: ignore
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\data\token_indexers\pretrained_transformer_mismatched_indexer.py", line 63, in __init__
**kwargs,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\data\token_indexers\pretrained_transformer_indexer.py", line 58, in __init__
model_name, tokenizer_kwargs=tokenizer_kwargs
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\data\tokenizers\pretrained_transformer_tokenizer.py", line 71, in __init__
model_name, add_special_tokens=False, **tokenizer_kwargs
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\allennlp\common\cached_transformers.py", line 110, in get_tokenizer
**kwargs,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 362, in from_pretrained
config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\transformers\models\auto\configuration_auto.py", line 368, in from_pretrained
config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\transformers\configuration_utils.py", line 424, in get_config_dict
use_auth_token=use_auth_token,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\transformers\file_utils.py", line 1087, in cached_path
local_files_only=local_files_only,
File "C:\Users\aap\Desktop\CoreNLP\corenlp\lib\site-packages\transformers\file_utils.py", line 1268, in get_from_cache
"Connection error, and we cannot find the requested files in the cached path."
ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on.
Process finished with exit code 1
Please, say me, what do I need to do my code works without Internet?
You will need a local copy of transformer model's configuration file and vocabulary so that the tokenizer and token indexer don't need to download those:
from transformers import AutoConfig, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(transformer_model_name)
config = AutoConfig.from_pretrained(transformer_model_name)
tokenizer.save_pretrained(local_config_path)
config.to_json_file(local_config_path + "/config.json")
You will then need to override the transformer model name in the configuration file to the local directory (local_config_path) where you saved these things:
predictor = Predictor.from_path(
r"C:\Users\aap\Desktop\coref-spanbert-large-2021.03.10.tar.gz",
overrides={
"dataset_reader.token_indexers.tokens.model_name": local_config_path,
"validation_dataset_reader.token_indexers.tokens.model_name": local_config_path,
"model.text_field_embedder.tokens.model_name": local_config_path,
},
)
I have run into similar problem when using structured-prediction-srl-bert without internet, and I saw in the logs 4 item for downloads:
dataset_reader.bert_model_name = bert-base-uncased, Downloading 4 files
model INFO vocabulary.py - Loading token dictionary from data/structured-prediction-srl-bert.2020.12.15/vocabulary. Downloading... 4x smaller files
Spacy models 'en_core_web_sm' not found
later on, [nltk_data] Error loading punkt: <urlopen error [Errno -3] Temporary failure in name resolution> [nltk_data] Error loading wordnet: <urlopen error [Errno -3] Temporary failure in name resolution>
I have solved it with these steps:
structured-prediction-srl-bert:
I have downloaded the structured-prediction-srl-bert.2020.12.15.tar.gz from the https://demo.allennlp.org/semantic-role-labeling (Model Card tab) -
https://storage.googleapis.com/allennlp-public-models/structured-prediction-srl-bert.2020.12.15.tar.gz
I have unzipped it into ./data/structured-prediction-srl-bert.2020.12.15
The code:
pip install allennlp==2.10.0 allennlp-models==2.10.0
from allennlp.predictors.predictor import Predictor
predictor = Predictor.from_path("./data/structured-prediction-srl-bert.2020.12.15/")
bert-base-uncased
I have created a folder ./data/bert-base-uncased and there I have downloaded these files from https://huggingface.co/bert-base-uncased/tree/main
config.json
tokenizer.json
tokenizer_config.json
vocab.txt
pytorch_model.bin
Aditionally, I had to change the "bert_model_name" from "bert-base-uncased" into a path "./data/bert-base-uncased", the earlier causes the download. This has to be done in the ./data/structured-prediction-srl-bert.2020.12.15/config.json , and there are two occurences.
python -m spacy download en_core_web_sm
python -c 'import nltk; nltk.download("punkt"); nltk.download("wordnet")'
After these steps the allennlp did not need internet anymore.

AWS Beanstalk integration with codecommit

I have existing python project on AWS Beanstalk I decided to integrate it with codecommit but I get following err when I enter Branch name.
Enter Branch Name
***** Must have at least one commit to create a new branch with CodeCommit *****
(default is "develop"): develop
Traceback (most recent call last):
File "/home/fartash/.local/bin/eb", line 11, in <module>
sys.exit(main())
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/core/ebcore.py", line 150, in main
app.run()
File "/home/fartash/.local/lib/python3.5/site-packages/cement/core/foundation.py", line 797, in run
return_val = self.controller._dispatch()
File "/home/fartash/.local/lib/python3.5/site-packages/cement/core/controller.py", line 472, in _dispatch
return func()
File "/home/fartash/.local/lib/python3.5/site-packages/cement/core/controller.py", line 478, in _dispatch
return func()
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/core/abstractcontroller.py", line 57, in default
self.do_command()
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/controllers/initialize.py", line 172, in do_command
branch = get_branch_interactive(repository)
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/controllers/initialize.py", line 575, in get_branch_interactive
source_control.setup_new_codecommit_branch(branch_name=branch_name)
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/objects/sourcecontrol.py", line 313, in setup_new_codecommit_branch
self.fetch_remote_branches(self.codecommit_remote_name)
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/objects/sourcecontrol.py", line 397, in fetch_remote_branches
stdout, stderr, exitcode = self._run_cmd(['git', 'fetch', self.get_codecommit_presigned_remote_url(),
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/objects/sourcecontrol.py", line 434, in get_codecommit_presigned_remote_url
signed_url = codecommit.create_signed_url(remote_url)
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/lib/codecommit.py", line 138, in create_signed_url
password = _sign_codecommit_url(aws.get_region_name(), remote_url)
File "/home/fartash/.local/lib/python3.5/site-packages/ebcli/lib/codecommit.py", line 130, in _sign_codecommit_url
signature = signer.signature(string_to_sign, request)
File "/home/fartash/anaconda3/lib/python3.5/site-packages/botocore/auth.py", line 305, in signature
k_date = self._sign(('AWS4' + key).encode('utf-8'),
TypeError: Can't convert 'NoneType' object to str implicitly

IMDbPY Importing to MySQL Problem

I am having a problem while trying to import imdb data from text files to MySQL database using imdbpy2sql.py script.
It throws the following error. It seems like the exception handler code tries to insert a duplicated record into cast_info table with existing primary key.
Can anyone help me fix this problem or suggest any work around solution?
SCANNING actor: Hall, Stephan
SCANNING actor: Halsey, William F.
* FLUSHING CharactersCache...
* TOO MANY DATA (100000 items in CharactersCache), recursion: 1
* SPLITTING (run 1 of 2), recursion: 1
* FLUSHING CharactersCache...
Traceback (most recent call last):
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 2951, in <module>
run()
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 2812, in run
castLists(_charIDsList=characters_imdbIDs)
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 1576, in castLists
doCast(f, roleid, rolename)
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 1535, in doCast
cid = CACHE_CID.addUnique(role)
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 957, in addUnique
else: return self.add(key, miscData)
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 950, in add
self[key] = c
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 860, in __setitem__
self.flush()
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 912, in flush
self.flush(quiet=quiet, _recursionLevel=_recursionLevel)
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 883, in flush
self._toDB(quiet)
File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 1186, in _toDB
CURS.executemany(self.sqlstr, self.converter(l))
File "C:\Python27\lib\site-packages\MySQLdb\cursors.py", line 206, in executemany
r = r + self.execute(query, a)
File "C:\Python27\lib\site-packages\MySQLdb\cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '745684' for key 'PRIMARY'")
A lot of similar problems were fixed in the development version.
Please try again with the version in the Mercurial repository:
https://bitbucket.org/alberanid/imdbpy/

Mercurial Push Error on Google Code Value Error

I am trying to learn to use mercurial by pushing onto Google code.
I have two .hgrc files: One file is located $PROJECT_DIR/.hg/.hrgc and $HOME/.hgrc. I have two separate files because I did not want to put the password out on the central repository.
Here is the content of $PROJECT_DIR/.hg/.hrgc:
[ui]
usermane=Venkat S. Rao <vrao423#gmail.com>
verbose=true
[paths]
default-push =https:vrao423:gc4yy3vB3mc4#//personal-site423.googlecode.com/hg/us
Here is the content of $HOME/.hgrc:
[ui]
username= Venkat Rao <vrao423#gmail.com>
verbose=True
[auth]
project.prefix=https://personal-site423.googlecode.com/hg/
password=###
username=vrao423
For username I have my Gmail id.
I can commit changes to my local repository, but when I try hg push I get this error.
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial#selenic.com
** Mercurial Distributed SCM (version 1.4.3)
** Extensions loaded:
Traceback (most recent call last):
File "/usr/bin/hg", line 27, in
mercurial.dispatch.run()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 30, in dispatch
return _runcatch(u, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 46, in _runcatch
return _dispatch(ui, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 454, in _dispatch
return runcommand(lui, repo, cmd, fullargs, ui, options, d)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 324, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 505, in _runcommand
return checkargs()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 459, in checkargs
return cmdfunc()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 453, in
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 386, in check
return func(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 2345, in push
other = hg.repository(cmdutil.remoteui(repo, opts), dest)
File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in repository
repo = _lookup(path).instance(ui, path, create)
File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 263, in instance
inst.between([(nullid, nullid)])
File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 184, in between
d = self.do_read("between", pairs=n)
File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 128, in do_read
fp = self.do_cmd(cmd, **args)
File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 80, in do_cmd
resp = self.urlopener.open(urllib2.Request(cu, data, headers))
File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 455, in https_open
self.auth = self.pwmgr.readauthtoken(req.get_full_url())
File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 141, in readauthtoken
group, setting = key.split('.', 1)
ValueError: need more than 1 value to unpack
Please help me. I have tried reading the hgrc man but that is just gibberish.
Thank You
Venkat
I'm a Mercurial developer. Please report problems with our man page on the mailinglist or on our bugtracker. I would love to hear from you so that we can make the man page better, so please write to us and tell us which part you found to be "gibberish".
In this particular case, the problem is that you need to write your auth section like this:
[auth]
project.prefix=https://personal-site423.googlecode.com/hg/
project.password=###
project.username=vrao423
where I would replace project with googlecode or something similar. We should of course report something sensible instead of a traceback and I can see that we already fixed this particular bug in Mercurial 1.5.