Question regarding Mercurial 1.8.2 - mercurial

i have a big problem with Mercurial 1.8.2 on Mac OSX 10.6
I used for long time with a lot of projects. Now i haven't used for about 4 weeks. Today i tried and OSX crashed with "hg add" command.
So i googled a little bit and found out, that there was a bug in OSX 10.5 where i have to deactive the SET LOCAL in Terminal Preferences.
I've done so - now
hg add
hg commit -m "message"
works, but when i run
hg push
i get the following error message where i find no information about
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]
** Mercurial Distributed SCM (version 1.8.2+20110401)
** Extensions loaded:
Traceback (most recent call last):
File "/usr/local/bin/hg", line 38, in <module>
mercurial.dispatch.run()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 36, in dispatch
return _runcatch(u, args)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 58, in _runcatch
return _dispatch(ui, args)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 601, in _dispatch
cmdpats, cmdoptions)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 406, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 655, in _runcommand
return checkargs()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 609, in checkargs
return cmdfunc()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 598, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/Library/Python/2.6/site-packages/mercurial/util.py", line 433, in check
return func(*args, **kwargs)
File "/Library/Python/2.6/site-packages/mercurial/commands.py", line 3002, in push
ui.status(_('pushing to %s\n') % url.hidepassword(dest))
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/Library/Python/2.6/site-packages/mercurial/url.py", line 354, in <module>
class httpconnection(keepalive.HTTPConnection):
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/Library/Python/2.6/site-packages/mercurial/keepalive.py", line 361, in <module>
class HTTPResponse(httplib.HTTPResponse):
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 76, in __getattribute__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'HTTPResponse'
Do you have any ideas?
Thanks,
Sascha

I think you should do exactly as said in the error message :
** unknown exception encountered, please report by visiting
** https://www.mercurial-scm.org/wiki/BugTracker

Related

what does the error message from hg convert mean?

i am trying to use hg convert to delete specific public files and create new repo.
the commands throws an error at a particular revision. this is the error message. please let me know what this is about and how can i resolve this.
#!python
** Mercurial version (4.6.1). TortoiseHg version (4.6.1)
** Command:
** CWD: C:\WINDOWS\system32
** Encoding: cp1252
** Extensions loaded: fetch, keyword, strip, mq, purge, rebase, shelve, split, convert, tortoisehg.util.configitems
** Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-5.9.2 PyQt-5.9.1 QScintilla-2.10.2.dev1711012104
Traceback (most recent call last):
File "tortoisehg\hgqt\repowidget.pyo", line 889, in onRevisionSelected
File "tortoisehg\hgqt\revdetails.pyo", line 307, in onRevisionSelected
File "tortoisehg\hgqt\revdetails.pyo", line 328, in _setContextToFileList
File "tortoisehg\hgqt\manifestmodel.pyo", line 289, in setRev
File "tortoisehg\hgqt\manifestmodel.pyo", line 403, in _repopulateNodes
File "tortoisehg\hgqt\manifestmodel.pyo", line 431, in _populateNodes
File "tortoisehg\hgqt\manifestmodel.pyo", line 604, in _populaterepo
File "tortoisehg\hgqt\manifestmodel.pyo", line 634, in _populatesubrepos
File "mercurial\util.pyo", line 1437, in __get__
File "mercurial\context.pyo", line 166, in substate
File "mercurial\subrepoutil.pyo", line 61, in state
File "mercurial\context.pyo", line 1088, in data
File "mercurial\util.pyo", line 1437, in __get__
File "mercurial\context.pyo", line 702, in _filenode
File "mercurial\filelog.pyo", line 54, in lookup
File "mercurial\revlog.pyo", line 1494, in lookup
File "mercurial\revlog.pyo", line 1416, in _match
File "mercurial\revlog.pyo", line 812, in rev
WdirUnsupported

MkDocs RuntimeError: StopIteration on mkdocs serve

I'm trying to run MkDocs and getting a StopIteration error when running mkdocs serve. This is on a fresh MkDocs project. I've installed MkDocs, ran mkdocs new my-project and then mkdocs serve.
It appears the file_match variable is empty on line 345 of config_options.py but I can't figure out what populates file_match. Is there an additional step between installing MkDocs and then using it that I'm missing?
Thanks for any help. My full stack trace is below.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 345, in walk_docs_dir
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/mkdocs/__main__.py", line 110, in serve_command
serve.serve(
File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 78, in serve
config = builder()
File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 67, in builder
config = load_config(
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/base.py", line 151, in load_config
errors, warnings = cfg.validate()
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/base.py", line 84, in validate
self._post_validate()
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/base.py", line 73, in _post_validate
config_option.post_validation(self, key_name=key)
File "/usr/local/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 370, in post_validation
for filename in self.walk_docs_dir(config['docs_dir']):
RuntimeError: generator raised StopIteration

Getting "NotImplementedError" from Mkdocs serve command [duplicate]

This question already has answers here:
Jupyter Notebook with Python 3.8 - NotImplementedError
(4 answers)
Closed 3 years ago.
I am setting up a documentation using mkdocs but I am getting "NotImplementedError" when runing the "mkdocs serve" command
Note that I am working on windows 10 and installed the Python 3.8.0a3 version
INFO - Building documentation...
INFO - Cleaning site directory
[I 190419 16:50:46 server:298] Serving on http://127.0.0.1:8000
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\mkdocs.exe\__main__.py", line 9, in <module>
File "c:\python38\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\python38\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\python38\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python38\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python38\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\python38\lib\site-packages\mkdocs\__main__.py", line 128, in serve_command
serve.serve(
File "c:\python38\lib\site-packages\mkdocs\commands\serve.py", line 124, in serve
_livereload(host, port, config, builder, site_dir)
File "c:\python38\lib\site-packages\mkdocs\commands\serve.py", line 58, in _livereload
server.serve(root=site_dir, host=host, port=port, restart_delay=0)
File "c:\python38\lib\site-packages\livereload\server.py", line 300, in serve
self.application(
File "c:\python38\lib\site-packages\livereload\server.py", line 255, in application
app.listen(port, address=host)
File "c:\python38\lib\site-packages\tornado\web.py", line 2112, in listen
server.listen(port, address)
File "c:\python38\lib\site-packages\tornado\tcpserver.py", line 152, in listen
self.add_sockets(sockets)
File "c:\python38\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets
self._handlers[sock.fileno()] = add_accept_handler(
File "c:\python38\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler
io_loop.add_handler(sock, accept_handler, IOLoop.READ)
File "c:\python38\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler
self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
File "c:\python38\lib\asyncio\events.py", line 498, in add_reader
raise NotImplementedError
NotImplementedError
I would like to get where the error come from and fix it
It seems like mkdocs does not the support the latest version of python which is 3.8.0a3.
In my case I fixed it by downgrading to 3.7

Django Unittest fails when run parallel on CircleCI

I am running Django Unit tests on CircleCI with 1 container setup. The tests run fine when I do not add Django's --parallel argument. However, when I add --parallel=2 to the test run, it fails with this cryptic error below.
I've tried both versions: with and without --keepdb - both fail with exactly the same error. The code for _clode_test_db appears to suggest that passing --keepdb=True should fail fast and return. See django/db/backends/mysql/creation.py line: 29 here [https://github.com/django/django/pull/4761/files]
Would appreciate any ideas on what is going on here
Using existing clone for alias 'default' ('test_django_learned')...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/test/runner.py", line 532, in run_tests
old_config = self.setup_databases()
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/test/runner.py", line 482, in setup_databases
self.parallel, **kwargs
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/test/runner.py", line 733, in setup_databases
keepdb=keepdb,
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 219, in clone_test_db
self._clone_test_db(number, verbosity, keepdb)
File "/home/circleci/sliderule/venv/lib/python2.7/site-packages/django/db/backends/mysql/creation.py", line 48, in _clone_test_db
dump_proc = subprocess.Popen(dump_cmd, stdout=subprocess.PIPE)
File "/usr/local/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Exited with code 1
I could reproduce it and debugged the problem in my ubuntu container by adding
sys.stderr.write("dump_cmd: %r" % dump_cmd)
to site-packages/django/db/backends/mysql/creation.py and it gave me
dump_cmd: ['mysqldump', '--user=root', '--password=pass', '--host=db', '--port=3306', 'test']
So probably your container is also missing mysqldump which I fixed with a simple sudo apt-get install mysql-client.

My django can't runserver on mac

Hi all and thanks for taking time to help.
I am a front-end developer and newbie on the Django project.
I am trying to config a project on my Mac.
My colleague helped me to install the virtual environment but it an error still be there when I try to run the server of my project(Hobbit is the name of my project).
(env) ➜ Hobbit git:(feature/sell_system_main) ✗ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/core/management/base.py", line 280, in execute
translation.activate('en-us')
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 130, in activate
return _trans.activate(language)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate
_active.value = translation(language)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch
app = import_module(appname)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 6, in <module>
from django.contrib.admin.sites import AdminSite, site
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 4, in <module>
from django.contrib.admin.forms import AdminAuthenticationForm
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/contrib/admin/forms.py", line 6, in <module>
from django.contrib.auth.forms import AuthenticationForm
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 17, in <module>
from django.contrib.auth.models import User
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/contrib/auth/models.py", line 48, in <module>
class Permission(models.Model):
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/models/base.py", line 96, in __new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/models/base.py", line 264, in add_to_class
value.contribute_to_class(cls, name)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/models/options.py", line 124, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/utils.py", line 198, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/utils.py", line 113, in load_backend
return import_module('%s.base' % backend_name)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/liao/workspace/env/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/liao/workspace/env/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: /usr/local/mysql/lib/libmysqlclient.18.dylib
Referenced from: /Users/liao/workspace/env/lib/python2.7/site-packages/_mysql.so
Reason: image not found
So I try to reinstall mysql by pip install mysql-python and result is
Requirement already satisfied (use --upgrade to upgrade): mysql-python in /Users/liao/workspace/env/lib/python2.7/site-packages
It seems that I have installed mysql in virtual environment.
Now I am confused what is the problem. Mysql or Django?