"abort: The system cannot find the file specified" in Mercurial - python

I have a large (~700MB) Mercurial repository. I can clone the repo fine without updating (and also it's totally browsable on Bitbucket, where it's hosted) but I can't update the working directory to the latest changeset because I get the following error:
... lot of getting [path] lines here
getting path/to/some/file.ext
abort: The system cannot find the file specified
[command returned code 255 Wed Jun 24 00:51:37 2015]
The last file before the error actually exists in the repo (it's visible in Bitbucket too).
I thought the issue was because of too long paths, but even cloning to a drive root yields the same. Paths could still be too long but "path/to/some/file.ext" is just 60 characters.
Running the command with traceback yields this:
Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 160, in _runcatch
File "mercurial\dispatch.pyo", line 885, in _dispatch
File "mercurial\dispatch.pyo", line 646, in runcommand
File "mercurial\dispatch.pyo", line 976, in _runcommand
File "mercurial\dispatch.pyo", line 947, in checkargs
File "mercurial\dispatch.pyo", line 882, in <lambda>
File "mercurial\util.pyo", line 716, in check
File "mercurial\extensions.pyo", line 168, in closure
File "mercurial\util.pyo", line 716, in check
File "hgext\mq.pyo", line 3505, in mqcommand
File "mercurial\util.pyo", line 716, in check
File "mercurial\commands.pyo", line 6402, in update
File "mercurial\hg.pyo", line 535, in clean
File "mercurial\hg.pyo", line 520, in updaterepo
File "mercurial\merge.pyo", line 1140, in update
File "mercurial\merge.pyo", line 772, in applyupdates
File "mercurial\subrepo.pyo", line 246, in submerge
File "mercurial\context.pyo", line 252, in sub
File "mercurial\subrepo.pyo", line 341, in subrepo
File "mercurial\subrepo.pyo", line 1206, in __init__
File "mercurial\subrepo.pyo", line 1216, in _ensuregit
File "mercurial\subrepo.pyo", line 1294, in _gitnodir
File "subprocess.pyo", line 710, in __init__
File "subprocess.pyo", line 958, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
The repo has git subrepos (these are public repos on GitHub). And hg-git works for me otherwise, I'm able to pull from and push to git repos from hg.
Anybody with an idea how to solve this?

Solved the issue: Lazy Badger pointed into the right direction. The issue was that the path to the git executable wasn't added to my PATH environment variable.
Adding C:\Program Files (x86)\Git\bin\ (or where you have git.exe on your system) to PATH with Rapid Environment Editor (I needed to use this tool as my PATH was over 1024 chars, so using setx wasn't working) to the System variables solved it.

Related

ValueError: path is on mount 'D:', start on mount 'C:' while doing pip install

I am new to python, and its ecosystem, so I am having trouble figuring out how to fix an error I am getting while trying to install a library for a project. I understand it has something to due with the fact that my computer has two hard drives, but I do not know how to fix it. (I know putting the project on the other drive probably would, but that drive is too small, and only really has my operating system.)
This is the traceback of the error:
Traceback (most recent call last):
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\cli\base_command.py", line 179, in main
status = self.run(options, args)
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\commands\install.py", line 384, in run
installed = install_given_reqs(
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\req\__init__.py", line 53, in install_given_reqs
requirement.install(
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\req\req_install.py", line 910, in install
self.move_wheel_files(
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\req\req_install.py", line 437, in move_wheel_files
move_wheel_files(
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\wheel.py", line 458, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\wheel.py", line 424, in clobber
record_installed(srcfile, destfile, changed)
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\wheel.py", line 351, in record_installed
newpath = normpath(destfile, lib_dir)
File "D:\(name)\(project)\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\wheel.py", line 68, in normpath
return os.path.relpath(src, p).replace(os.path.sep, '/')
File "C:\Users\(name)\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 703, in relpath
raise ValueError("path is on mount %r, start on mount %r" % (
ValueError: path is on mount 'D:', start on mount 'C:'
Also, further information, though I don't think it is relevant(but just in case), I am installing this package in PyCharm, which itself runs the pip command.

Errors while running Kivy after PyInstaller: pyi_rth_pkgres, wordcount.kv, unable to get a window etc

I need to compile a standalone executive or --onedir version of it for my Kivy application for Windows using PyInstaller. I experience problems one after another, and this is why I post it here. I can find solutions for almost all of them, but it seems that something goes wrong from the beginning.
The program consists of .py and .kv file, requires (apart from Kivy modules) only Textract (imported as txt) and works perfectly if I use shell of IDLE.
I use the latest versions of Kivy and PyInstaller (in case if PyInstaller I also tried developer version, as some people suggested).
The first problem I encounter is
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[4808] Failed to execute script pyi_rth_pkgres
which I solve with
pyinstaller wordcount.py --hiddenimport pkg_resources.py2_warn
as some people suggested to deal with this issue before. Then, full of pleasant expectations, I run the .exe again and get this:
FileNotFoundError: [Errno 2] No such file or directory: 'wordcount.kv'
[3356] Failed to execute script wordcount
Obviously, the .kv was somehow not included in the package, okay, I change my command again:
pyinstaller wordcount.py --add-data "./wordcount.kv;." --hiddenimport pkg_resources.py2_warn
manually forcing the .kv into package. Or I could just copy it there - with the same result:
[WARNING] [Image ] Unable to load image <C:\GUI Projects\wordcount\dist\wordcount\kivy_install\data\glsl\default.png>
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - Exception: SDL2: Unable to load image
File "site-packages\kivy\core\__init__.py", line 71, in core_select_lib
File "site-packages\kivy\core\window\window_sdl2.py", line 152, in __init__
File "site-packages\kivy\core\window\__init__.py", line 981, in __init__
File "site-packages\kivy\core\window\window_sdl2.py", line 312, in create_window
File "site-packages\kivy\core\window\__init__.py", line 1258, in create_window
File "kivy\graphics\instructions.pyx", line 783, in kivy.graphics.instructions.RenderContext.__init__
File "site-packages\kivy\core\image\__init__.py", line 561, in __init__
File "site-packages\kivy\core\image\__init__.py", line 756, in _set_filename
File "site-packages\kivy\core\image\__init__.py", line 460, in load
File "site-packages\kivy\core\image\__init__.py", line 223, in __init__
File "site-packages\kivy\core\image\img_sdl2.py", line 47, in load
[CRITICAL] [App ] Unable to get a Window, abort.
as people suggest, onw may just copy .dlls to the directory ([Dist]\\libpng16-16.dll). Or to rewrite spec. like this:
... regrettably, without any positive result.
Traceback (most recent call last):
File "wordcount.py", line 47, in <module>
WordCount().run()
File "site-packages\kivy\app.py", line 855, in run
File "site-packages\kivy\base.py", line 504, in runTouchApp
File "site-packages\kivy\core\window\window_sdl2.py", line 747, in mainloop
File "site-packages\kivy\core\window\window_sdl2.py", line 479, in _mainloop
File "site-packages\kivy\base.py", line 339, in idle
File "site-packages\kivy\clock.py", line 591, in tick
File "kivy\_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
File "site-packages\kivy\uix\filechooser.py", line 698, in _update_files
File "site-packages\kivy\uix\filechooser.py", line 718, in _create_files_entries
File "site-packages\kivy\uix\filechooser.py", line 839, in _generate_file_entries
File "site-packages\kivy\uix\filechooser.py", line 871, in _add_files
File "site-packages\kivy\uix\filechooser.py", line 871, in <listcomp>
File "site-packages\kivy\uix\filechooser.py", line 178, in is_hidden
ModuleNotFoundError: No module named 'win32timezone'
[10576] Failed to execute script wordcount
Moreover, I'm pretty sure this is just the beginning. Is there any other solution?
Any help will be appreciated. I know these issues were discussed before, and I apologize in advance, but non of the solutions I found work for me.
PS: the list of "missing modules" in warn.txt is long as the Great Wall of China, is it normal? Especially considering that only two modules are in use.
Well, I solved the issue, but the solution is not very elegant:
pyinstaller --add-data "./wordcount.kv;." --hiddenimport pkg_resources.py2_warn --hiddenimport win32timezone --hiddenimport textract.parsers.pptx_parser --hiddenimport textract.parsers.docx_parser wordcount.py
Then I copied libpng16-16.dll from one of the Python folders to the /dist/ folder.
If somebody knows better way please share it...

Github python script hanging: "WindowsError: [Error 2] The system cannot find the file specified"

I'm running a python script that exports xml from a database, converts the record to PDF, then attempts to upload both the xml and pdf files to a github repository. The export and pdf conversion work fine, but the process then hangs and outputs the following error message:
Traceback (most recent call last):
File "asExportIncremental.py", line 394, in <module>
main()
File "asExportIncremental.py", line 320, in main
gitPush()
File "asExportIncremental.py", line 308, in gitPush
repo.push()
File "C:\Python27\lib\site-packages\gittle\gittle.py", line 343, in push
return self.push_to(origin_uri, branch_name, progress)
File "C:\Python27\lib\site-packages\gittle\gittle.py", line 338, in push_to
progress=progress
File "C:\Python27\lib\site-packages\dulwich\client.py", line 440, in send_pack
proto, unused_can_read = self._connect('receive-pack', path)
File "C:\Python27\lib\site-packages\dulwich\client.py", line 893, in _connect
port=self.port, username=self.username)
File "C:\Python27\lib\site-packages\dulwich\client.py", line 758, in run_command
stdout=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
My problem is that I'm not exactly sure where the script is failing. To which file is "WindowsError: [Error 2] The system cannot find the file specified" referring? How do I fix it? Thanks!
The script calls gittle (high-level python git library) which executes dulwich (low-level python git wrapper) which runs ssh and fails. It seems ssh.exe is not in your PATH.

No translation file found for domain 'django'

Environment :
python 2.7.10
django 1.8.6(copied from site-package folder)
I copied the django distribute into my project folder.
Thinking it will work well
It works perfectly in one of my machine, but throw an error below in another one
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "cmdb_lib/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "cmdb_lib/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "cmdb_lib/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "cmdb_lib/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "cmdb_lib/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "cmdb_lib/django/core/management/base.py", line 458, in execute
translation.activate(saved_locale)
File "cmdb_lib/django/utils/translation/__init__.py", line 146, in activate
return _trans.activate(language)
File "cmdb_lib/django/utils/translation/trans_real.py", line 222, in activate
_active.value = translation(language)
File "cmdb_lib/django/utils/translation/trans_real.py", line 206, in translation
_translations[language] = DjangoTranslation(language)
File "cmdb_lib/django/utils/translation/trans_real.py", line 115, in __init__
self._init_translation_catalog()
File "cmdb_lib/django/utils/translation/trans_real.py", line 153, in _init_translation_catalog
translation = self._new_gnu_trans(localedir, use_null_fallback)
File "cmdb_lib/django/utils/translation/trans_real.py", line 136, in _new_gnu_trans
fallback=use_null_fallback)
File "/usr/local/lib/python2.7/gettext.py", line 472, in translation
raise IOError(ENOENT, 'No translation file found for domain', domain)
IOError: [Errno 2] No translation file found for domain: u'django'
But in my settings.py I set LANGUAGE_CODE = 'en-us' as default!
How could this throw an error?
I tried to pip install django, problem solved ,but I still want to include the django package in my project.
How can I achieve this?
I think I got the solution , my .gitignorefile ignored the .mo file , I added it and everything 's OK now
If you are using git, check your .gitignore file and comment*.mo
add the missing .mofile ,and things will be good

Marmalade deploy - deployment.py, line 62, in SetOpt

I got a mac book pro retina and I'am trying to create a project from the .mkb file: but I got this error
Building project: /Users/sergioandreotti/Downloads/twins/template/marmalade/FeedtheTwins.mkb
Traceback (most recent call last):
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 209, in <module>
run()
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 137, in run
main(sys.argv)
File "/Developer/Marmalade/6.1/s3e/makefile_builder/mkb.py", line 32, in main
exit_code = mkb_main.run(argv)
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 3461, in run
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 3619, in run2
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2697, in process_mkb_for_platform
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 690, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2602, in process_file
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2124, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 2124, in <lambda>
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 1971, in process
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/mkb_main.py", line 1130, in process_deployment_line
File "/p4/sdkbuild/sdk/main/s3e/makefile_builder/deployment.py", line 62, in SetOpt
NameError: global name 'output' is not defined
Press enter to continue...
I ve found this solution: https://devnet.madewithmarmalade.com/questions/2784/mkb-fails-to-build.html
but I don't think it's the best solution.
it's working for building the project but I got other problems when I have to deploy with the Marmalade deploy tool.
Sometimes deploy fails and the error in the error log is the same "global name 'output' is not defined"
I m not able to save my configuration in the .mkb, because if I do this, next time I reload the configuration, the deploy fails.
it was my fault, I had marmalade 6.1.1 installed instead of 6.1.2.
6.1.1 doensn't provide retina support and in the .mkb there was the tag "Enable 4-inch Retina Support" set.

Categories