Hi ,
Thanks for reaching out to Microsoft Q&A.
Since the same code and models work on another machine and not yours, this might be an environmental issue specific to your computer rather than a problem with azure document Intelligence or the model itself.
- Check Network-Level Issues
- Firewall/Antivirus: Some aggressive firewall or endpoint protection software can delay or block outbound traffic or callbacks from Azure. Temporarily disable your antivirus or firewall and test.
- Corporate VPNs/Proxies: Even if a VPN made no difference, make sure your network traffic is not being inspected or throttled.
- curl -X GET https://<your-form-recognizer-endpoint>/formrecognizer/info
- from your terminal and see if the latency is high or the request fails.
- VS Code-Specific Troubles
Try running the same script from a terminal or another IDE (like Python directly or Jupyter). This rules out VS Code extensions or runtime configuration being the problem.
- Disable VS Code extensions, especially:
- Azure account/azure Tools
- Environment Variables / Python Issues
- Ensure your Python environment is clean. Some HTTP libraries or retry policies can mess with long-running async requests.
- Recreate your virtual environment:
python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install -r requirements.txt
- Use the official Azure SDK, not a REST wrapper, unless absolutely needed:
from azure.ai.formrecognizer import DocumentAnalysisClient
- Check Request Throttling / Headers
- Enable detailed logging for the client: :
- import logging logging.basicConfig(level=logging.DEBUG)
-
- Look for:
- Any 429 (rate limits)
- Connection retries
- Network stalls
- Compare with Working Machine
If urgent and none of the above helps:
- Run the script from a Docker container or WSL with a clean image
- Or use Azure Functions or Logic Apps to invoke the model instead, as a workaround
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.