Unable to upload to pypi

➜ nbdev_pypi
File “setup.py”, line 53
‘nbdev’: [f’{cfg.get(“lib_path”)}={cfg.get(“lib_path”)}._modidx:d’]
^
SyntaxError: invalid syntax
ERROR InvalidDistribution: Cannot find file (or expand pattern):

I have created he ~/.pypirc file with my credentials as well

Which Python version are you using?

i am using conda env with python version 3.9

Sounds like you don’t have a _modidx.py file. That should be auto-generated when you export.

Actually I do have the file.
I am sharing the github link of the repo in case that helps
https://github.com/AdityaVarmaUddaraju/nbdev-hello-world

Could you please share the entire stack trace and error message?

➜ nbdev_pypi
File “setup.py”, line 53
‘nbdev’: [f’{cfg.get(“lib_path”)}={cfg.get(“lib_path”)}._modidx:d’]
^
SyntaxError: invalid syntax
ERROR InvalidDistribution: Cannot find file (or expand pattern):
‘/home/roark/lab/nbdev-hello-world/dist/*’

this is the output I received for the command, Is there a way I can provide better logs from it

What does python --version return?

I was experiencing a similar issue, using Python 3.9 for my base conda environment. (python --version returned “Python 3.9.12”) Once I updated to Python 3.10 (conda install python=3.10 in my base in environment), the error went away.