Skip to content
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] ImportError: cannot import name '_T' from 'marshmallow.fields' with marshmallow==3.24.0 #3902

Open
jiazengcindy opened this issue Jan 6, 2025 · 12 comments
Labels
bug Something isn't working

Comments

@jiazengcindy
Copy link
Contributor

Describe the bug
A clear and concise description of the bug.

How To Reproduce the bug
Steps to reproduce the behavior, how frequent can you experience the bug:
1

from marshmallow.fields import _T, Field, Nested

Run
from marshmallow.fields import _T, Field, Nested
will cause this issue when marshmallow==3.24.0, but the issue does not occur with marshmallow==3.23.2

@jiazengcindy jiazengcindy added the bug Something isn't working label Jan 6, 2025
@MilesHolland
Copy link
Member

Yep, we've been investigating this. Marshamllow 3.24 released 3 hours ago and appears to have included some breaking changes that affected PF.

@MilesHolland
Copy link
Member

Update: Unfortunately, it seems that not only is PF impacted by this, but so are at least one of its dependencies, which means multiple releases across systems will be needed to clear this up.

@huliang-microsoft
Copy link

It seems that some of our az cli command got affected as well in azure devops pipeline.

I cannot be 100% sure but the timeline matches (no code changes)
WARNING:processtools:/db978cdc-ca91-4867-8562-270d20e4bb3d | ===> STDOUT[0]: cannot import name '_T' from 'marshmallow.fields' (/opt/az/azcliextensions/ml/marshmallow/fields.py)
WARNING:processtools:/db978cdc-ca91-4867-8562-270d20e4bb3d | ===> STDERR[0]: ERROR: An error occurred whilst updating.
WARNING:processtools:/db978cdc-ca91-4867-8562-270d20e4bb3d | ===> STDERR[1]: ERROR: The extension ml already exists.
WARNING:processtools:/db978cdc-ca91-4867-8562-270d20e4bb3d | ===> STDERR[2]: ERROR: The command failed with an unexpected erro

@duongthaiha
Copy link

This also impact the AI Foundry Evaluation SDK as well please

@vamsithumma2812
Copy link

I also had the same issue. I manually set marshmallow==3.23.2 in my requirements.txt, which solved the problem.

@rfolkes
Copy link

rfolkes commented Jan 7, 2025

I also had the same issue. I manually set marshmallow==3.23.2 in my requirements.txt, which solved the problem.

Worked for me aswell - thanks!

@0-sv
Copy link

0-sv commented Jan 7, 2025

Same problem but in an Azure DevOps pipeline. Fixed by running /opt/az/bin/python3 -m pip install marshmallow==3.23.2.

@jsilvcast
Copy link

This topic is related to a comment mentioned in another repository: Azure/azure-cli-extensions #8400

@prise6
Copy link

prise6 commented Jan 8, 2025

Hotfix has been released : Azure/azure-sdk-for-python#39039

@duongthaiha : i created an issue to alert on this. Feel free to join in.

@fsandes-ciandt
Copy link

Any news? This impacts the VSCode extension as well.

@Ranjanbehl
Copy link

Ranjanbehl commented Jan 8, 2025

I had this issue affecting my devOps pipeline(azurecli@v2 github action usage). I had to manually install the azure-cli and pip install marshmallow==3.23.2 to get my pipeline to work. Otherwise, I would need to wait for the azurecli@v2 authors to fix the issue.

@lambdakris
Copy link

FYI, this is affecting the azure-ai-evaluation package as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests