ERROR: TypeError - expected str, bytes or os.PathLike object, not NoneType
See original GitHub issueSystem 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:17
Top Results From Across the Web
TypeError: expected str, bytes or os.PathLike object, not None ...
Apparently os.getenv("HOME") would return a Nonetype value if the environment variable doesn't exist. Try os.getenv('HOME', "not found") to ...
Read more >TypeError: expected str, bytes or os.PathLike object, not ...
Getting this error on using model_main_tf2.py: Traceback (most recent call last): File "model_main_tf2.py", line 115, in
Read more >expected str, bytes or os.PathLike object, not NoneType - CDO
I have this error : TypeError: expected str, bytes or os.PathLike object, not NoneType. It's link with cdo because when I mask this...
Read more >typeerror: expected str, bytes or os.pathlike object, not set
getenv("HOME") would return a Nonetype value if the environment variable doesn't exist. Try os.getenv('HOME', "not found") to be sure. --gives output as "not...
Read more >expected str, bytes or os.PathLike object, not list - YouTube
TypeError : expected str, bytes, or os. PathLike object, not list - Django static and media files problem solved. Django STATIC_URL, MEDIA_URL ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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/config
file, it returns “none” which results inTypeError
. this values are set in.git/config
while 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
master
let 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
.elasticbanstalk
folder and doneeb init
again without the code commit 🙄