aws-elastic-beanstalk-cli: ERROR: TypeError - expected str, bytes or os.PathLike object, not NoneType
System Info
OS: Windows 10 Shell: cmd
Description
ERROR: TypeError - expected str, bytes or os.PathLike object, not NoneType I get this error while following this guide from aws , when I use “eb deploy”.
If I’m supposed to raise it somewhere else please Point to it.
Here are my verbose logs
eb deploy --verbose
INFO: Deploying code to node-express-env in region us-east-1
INFO: Getting version label from git with git-describe
INFO: Pushing local code to codecommit with git-push
INFO: Traceback (most recent call last):
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\core\ebrun.py", line 62, in run_app
app.run()
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\cement\core\foundation.py", line 797, in run
return_val = self.controller._dispatch()
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\cement\core\controller.py", line 472, in _dispatch
return func()
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\cement\core\controller.py", line 478, in _dispatch
return func()
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\core\abstractcontroller.py", line 92, in default
self.do_command()
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\controllers\deploy.py", line 79, in do_command
deployops.deploy(self.app_name, self.env_name, self.version, self.label,
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\operations\deployops.py", line 48, in deploy
app_version_label = commonops.create_codecommit_app_version(
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\operations\commonops.py", line 583, in create_codecommit_app_version
source_control.push_codecommit_code()
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\objects\sourcecontrol.py", line 324, in push_codecommit_code
stdout, stderr, exitcode = self._run_cmd(
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\ebcli\objects\sourcecontrol.py", line 519, in _run_cmd
stdout, stderr, exitcode = exec_cmd(cmd)
File "c:\users\himanshu\.ebcli-virtual-env\lib\site-packages\cement\utils\shell.py", line 40, in exec_cmd
proc = Popen(cmd_args, *args, **kw)
File "c:\python38\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\python38\lib\subprocess.py", line 1247, in _execute_child
args = list2cmdline(args)
File "c:\python38\lib\subprocess.py", line 549, in list2cmdline
for arg in map(os.fsdecode, seq):
File "c:\python38\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType
INFO: TypeError - expected str, bytes or os.PathLike object, not NoneType
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 9
- Comments: 18
@himanshusaini-fa I was finally able to reproduce the issue. Issue here is CLI look for current repository name based on the current branch name (
git config --get branch.master.remote) while deploying application via codecommit and if remote branch is not set in.git/configfile, it returns “none” which results inTypeError. this values are set in.git/configwhile initializing an application with codecommit.In case if branch details are not set, you can add your remote branch configurations in
.git/config,Note: in this example codecommit branch name is
masterlet us know if you have any questions. thanks!
same issue when eb init with code commit. The way I’ve fixed it is I’ve deleted the
.elasticbanstalkfolder and doneeb initagain without the code commit 🙄I got it to work by downgrading to awsebcli==3.18.1 (one version ago)
Amazingly this bug is still not fixed. The stack trace I get after --verbose is the same in the OP.
Closing this issue as there has been no update for an extended period of time.
Based on this comment, I added these lines to config and switched to the master branch. After that,
eb createworked well. Thank you edit : converted sentence to one lineThe only thing which worked for me was downgrading to 3.18.1 (current version installed using the CLI setup scripts):