You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, running Markdoc without rsync installed causes the following confusing error message to be displayed:
PS C:\Users\lws\Documents\GitHub\morrowind-dnd3.5> markdoc build
Traceback (most recent call last):
File "C:\Python27\Scripts\markdoc-script.py", line 9, in <module>
load_entry_point('Markdoc==0.6.6', 'console_scripts', 'markdoc')()
File "C:\Python27\lib\site-packages\markdoc\cli\main.py", line 38, in main
return command(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 29, in wrapper
return function(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 270, in build
sync_html(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 29, in wrapper
return function(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 238, in sync_html
subprocess.check_call(command)
File "C:\Python27\lib\subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
If we run with the --verbose option we can see this is just after the Markdoc attempts to call rsync which is not installed.
Markdoc should trap this exception and produce a more useful error message, such as OSError: rsync not installed or could not be found.
Actually it's even worse than this; I do have rsync installed (via cwRsync) but Python can't find it. This is a Windows specific bug. The problem is at commands.py:238 where subprocess.check_call() is called with the default argument of shell=False. To quote from Walter Mundt's StackOverflow answer - "Also, on Windows with shell=False, it pays no attention to PATH at all, and will only look in relative to the current working directory". So even though rsync is on my path, Python on Windows can't find it.
The text was updated successfully, but these errors were encountered:
I know this is pretty old, but I forked this project and rewrote the sync stuff in pure Python; as it turns out there's a bug in make_relative at render.py:35 that causes relative resolution to fail on Windows for source files due to differing path separators. So even with rsync, building wouldn't have worked properly.
On Windows, running Markdoc without
rsync
installed causes the following confusing error message to be displayed:If we run with the
--verbose
option we can see this is just after the Markdoc attempts to callrsync
which is not installed.Markdoc should trap this exception and produce a more useful error message, such as
OSError: rsync not installed or could not be found.
Actually it's even worse than this; I do have
rsync
installed (viacwRsync
) but Python can't find it. This is a Windows specific bug. The problem is atcommands.py:238
wheresubprocess.check_call()
is called with the default argument ofshell=False
. To quote from Walter Mundt's StackOverflow answer - "Also, on Windows with shell=False, it pays no attention to PATH at all, and will only look in relative to the current working directory". So even thoughrsync
is on my path, Python on Windows can't find it.The text was updated successfully, but these errors were encountered: