-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: sam sync - TypeError #7581
Comments
Exact Same Error as above, have tried: Thoroughly clean your environment: Remove any residual files: Manually delete any SAM CLI or watchdog related files or folders in your Python installation directory.
System Python: If you're using the system-wide Python installation, there might be conflicts with other system packages or configurations. Consider using a separate Python installation managed by a tool like pyenv to avoid such issues. SAM CLI settings: If you're using an IDE with SAM CLI integration, check its settings for any configurations related to SAM CLI, Python environments, or dependency management. |
I am able to reproduce the issue when installing sam through pip, but it works fine when installed through our published installers. |
@sidhujus I have done as you instructed, I uninstalled sam locally and from pip. I then installed using the MSI package and restarted VSCode so its terminal would restart. I Ran sam --version to make sure it had installed correctly and again, I am looking at this error: Error: BaseObserver.schedule() takes 3 positional arguments but 4 were given An unexpected error was encountered while executing "sam sync".` |
I am getting errors now too for sam deploy guided, about pip packages. I am going to have to uninstall sam-cli the way you suggested and do it through pip to get my deploys up. |
i did a modify>repair and deploy is working again. I am also going to try sync after |
@sidhujus So Sam sync still does not work and provides the same error on my end, Ref: Error: BaseObserver.schedule() takes 3 positional arguments but 4 were given An unexpected error was encountered while executing "sam sync".` |
Received the same error above while running "The Complete AWS SAM Workshop". With both commands specified below: SAM CLI, version 1.126.0
or
|
Same issue for me, upgraded Ubuntu to 24.04.1 LTS (Python 3.12.3) Clean re-install of all software including SAM. Uninstalled SAM and fresh install from AWS: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html issue not resolved by re-installing |
Seeing the same issue on macOS. |
It looks like the issue is coming from the watchdog version bump to 5.0.3. The team is actively working on the fix. Please use the previous version SAM CLI 1.125.0 as a workaround while the team works on getting the fix out. |
Same issue on Mac Ventura 13.6.9
UPD: works if I install sam cli with pip instead of brew.
|
A fix has been release in SAM CLI version 1.127.0. Please try installing using the docs and let us know if you are still running into issues or have any questions. Closing this ticket. |
|
Thanks @hnnasit yes 1.127.0 resolved the issue! |
Description:
When running sam sync --stack-name [my stack name] --watch, the stack update success, but then the following error is returned:
Steps to reproduce:
sam sync --stack-name [my stack name] --watch
I'm running with Python 3.9.16
Observed result:
See above in description.
Expected result:
sam sync should run without error. Internal python code error in the samcli should be resolved.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Add --debug flag to command you are running
See error message above.
The text was updated successfully, but these errors were encountered: