I received the following error when deploying to S3 with the latest change to path posixification changes:
Traceback (most recent call last):
File "/usr/local/bin/lektor", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/cli.py", line 290, in deploy_cmd
for line in event_iter:
File "/Users/alice/Projects/lektor-s3/lektor_s3.py", line 254, in publish
diff = self.compute_diff(local, remote)
File "/Users/alice/Projects/lektor-s3/lektor_s3.py", line 146, in compute_diff
key = posixify(self.key_prefix + f)
File "/Users/alice/Projects/lektor-s3/lektor_s3.py", line 279, in posixify
return posixpath.join(*split_path(path))
TypeError: join() takes at least 1 argument (0 given)
It was never entering the while loop in split_path because os.path.split(path) was always returning an array where the first element was an empty string. I fixed this for myself by changing the initialization of last_split from an empty string to None. The tests pass but I'm not 100% sure if it's the way to go since I don't really know why the problem occurred in the first place. I have opened a PR anyway.
I received the following error when deploying to S3 with the latest change to path posixification changes:
It was never entering the
while
loop insplit_path
becauseos.path.split(path)
was always returning an array where the first element was an empty string. I fixed this for myself by changing the initialization oflast_split
from an empty string toNone
. The tests pass but I'm not 100% sure if it's the way to go since I don't really know why the problem occurred in the first place. I have opened a PR anyway.