Upload to pypi fails with "list index out of range"
In the last couple of days, I've occasionally had trouble uploading a package with the following error message:
Traceback (most recent call last):
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/cli.py", line 413, in main
environments=options.environments, tasks=arguments)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/reactor.py", line 128, in build
return self.build_execution_plan(tasks, execution_plan)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/reactor.py", line 166, in build_execution_plan
reactor=self)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/execution.py", line 351, in execute_execution_plan
summaries.append(self.execute_task(task, **keyword_arguments))
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/execution.py", line 298, in execute_task
task.execute(self.logger, keyword_arguments)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/execution.py", line 169, in execute
executable.execute(argument_dict)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/execution.py", line 100, in execute
self.callable(*arguments)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/plugins/python/distutils_plugin.py", line 279, in upload
execute_twine(project, logger, upload_cmd_args, False)
File "/home/ingo/code/esdt/.venv3/lib/python3.6/site-packages/pybuilder/plugins/python/distutils_plugin.py", line 343, in execute_twine
artifacts = [os.path.join(dist_artifact_dir, artifact) for artifact in list(os.walk(dist_artifact_dir))[0][2]]
IndexError: list index out of range
I found that at this point dist_artifact_dir is target/dist/<packagename>-<version>/dist, but the dist subfolder doesn't exist. This is not really reproducable unfortunately.
Sometimes, it's possible to fix it by adding a couple of additional commits, sometimes that doesn't help and also, I'm not necessarily eager to add "fake commits" to be able to release. Any idea what could go wrong here?
It definitely isn't possible to fix it by running pyb package manually, but I've had success running pyb install manually.
Any updates on this one?
Sorry, kind of missed this one.
What version are you on? Not being reproducible is very bizarre. I've never encountered it and haven't heard of anybody else encountering it.
I keep having it from time to time. Wasn't able to solve it this time. I believe that I'm using the most recent one (pyb 0.12.0.dev20190116131423).
Can you please retry with current build?
Thank you for your effort. I'll give it a try. As I said, it isn't reproducible in a predictable way. So I guess all I can do is upgrade to the development version and then wait a couple of weeks. So don't expect anything too soon.