# \#python

**URL:** https://discuss.ai.google.dev/tag/python/210.md?match_all_tags=true&page=1&tags%5B%5D=python

[Latest](https://discuss.ai.google.dev/latest.md) · [Categories](https://discuss.ai.google.dev/categories.md) · [Tags](https://discuss.ai.google.dev/tags.md)

**Page:** 2

---

## [Best practices for Multi-Subject Pose Transfer and Interaction Physics using Gemini API?](https://discuss.ai.google.dev/t/best-practices-for-multi-subject-pose-transfer-and-interaction-physics-using-gemini-api/116089)

<div class="topic-metadata">

**Author:** [@Basic\_Visual](https://discuss.ai.google.dev/u/Basic_Visual)\
**Replies:** 0\
**Last updated:** [January 19, 2026, 4:59am UTC](https://discuss.ai.google.dev/t/best-practices-for-multi-subject-pose-transfer-and-interaction-physics-using-gemini-api/116089 "2026-01-19T04:59:09Z")

</div>

Hello everyone, I am working on a project to recreate cinematic poses from reference images using the Google Gen AI SDK (Python). My goal is to achieve a high-fidelity transfer that captures not just the skeletal pose, …

---

## [Receiving Daily Quotas exhausted - But almost didn't use the Gemini API](https://discuss.ai.google.dev/t/receiving-daily-quotas-exhausted-but-almost-didnt-use-the-gemini-api/115852)

<div class="topic-metadata">

**Author:** [@Urbano\_Freitas](https://discuss.ai.google.dev/u/Urbano_Freitas)\
**Replies:** 0\
**Last updated:** [January 16, 2026, 3:52pm UTC](https://discuss.ai.google.dev/t/receiving-daily-quotas-exhausted-but-almost-didnt-use-the-gemini-api/115852 "2026-01-16T15:52:57Z")

</div>

Hi all, I’m Gemini Pro subscriber and I’m having this warning: ”✕ \[API Error: You have exhausted your daily quota on this model.\]” As soon I started using Gemini CLI, or try to use the the Gemini API in an app (Python…

---

## [I can't seem to upload python files to aistudio anymore](https://discuss.ai.google.dev/t/i-cant-seem-to-upload-python-files-to-aistudio-anymore/111839)

<div class="topic-metadata">

**Author:** [@Hari\_Nair](https://discuss.ai.google.dev/u/Hari_Nair)\
**Replies:** 11\
**Last updated:** [December 31, 2025, 3:37am UTC](https://discuss.ai.google.dev/t/i-cant-seem-to-upload-python-files-to-aistudio-anymore/111839 "2025-12-31T03:37:18Z")

</div>

The file upload tool seems to be currently graying out python files.

---

## [Code generation errors with gemini-2.5-pro](https://discuss.ai.google.dev/t/code-generation-errors-with-gemini-2-5-pro/103102)

<div class="topic-metadata">

**Author:** [@Amit\_Goel](https://discuss.ai.google.dev/u/Amit_Goel)\
**Replies:** 3\
**Last updated:** [December 19, 2025, 5:42pm UTC](https://discuss.ai.google.dev/t/code-generation-errors-with-gemini-2-5-pro/103102 "2025-12-19T17:42:38Z")

</div>

We are trying to do step-by-step code generation in Python for our given problem statement. After every code step is generated, we execute the code separately (not through code execution feature) to verify it. However, w…

---

## [Google AI Studio is a Nightmare to maintain Python Scripts](https://discuss.ai.google.dev/t/google-ai-studio-is-a-nightmare-to-maintain-python-scripts/107586)

<div class="topic-metadata">

**Author:** [@Jacques\_Drocer](https://discuss.ai.google.dev/u/Jacques_Drocer)\
**Replies:** 1\
**Last updated:** [December 11, 2025, 12:22pm UTC](https://discuss.ai.google.dev/t/google-ai-studio-is-a-nightmare-to-maintain-python-scripts/107586 "2025-12-11T12:22:58Z")

</div>

I use Google AI Studio to create Python Script. At the beginning, all is great. But after asking modifications, the AI hallucinates. Don’t respond to the last conversation. Removes some parts of code without any reas…

---

## [mimeType parameter with value application/json, which is not supported](https://discuss.ai.google.dev/t/mimetype-parameter-with-value-application-json-which-is-not-supported/85960)

<div class="topic-metadata">

**Author:** [@Anton\_Chernov](https://discuss.ai.google.dev/u/Anton_Chernov)\
**Replies:** 5\
**Last updated:** [December 10, 2025, 7:28am UTC](https://discuss.ai.google.dev/t/mimetype-parameter-with-value-application-json-which-is-not-supported/85960 "2025-12-10T07:28:38Z")

</div>

Why it works in AI Studio, but locally with pythons genai i got error like google.genai.errors.ClientError: 400 INVALID\_ARGUMENT. {'error': {'code': 400, 'message': 'Unable to submit request because it has a mimeType pa…

---

## [\[Project Showcase\] Control Blender 3D using Gemini/LLMs via Model Context Protocol (MCP)](https://discuss.ai.google.dev/t/project-showcase-control-blender-3d-using-gemini-llms-via-model-context-protocol-mcp/110424)

<div class="topic-metadata">

**Author:** [@mous\_tik](https://discuss.ai.google.dev/u/mous_tik)\
**Replies:** 1\
**Last updated:** [November 28, 2025, 7:57pm UTC](https://discuss.ai.google.dev/t/project-showcase-control-blender-3d-using-gemini-llms-via-model-context-protocol-mcp/110424 "2025-11-28T19:57:18Z")

</div>

Hi everyone! I’m working on an open-source project, mcp-blender-bridge, which aims to integrate Google Gemini directly into Blender using the Model Context Protocol (MCP). The goal is to have a true “Agentic” workfl…

---

## [On-device training of simple autoencoder fails because of Select Ops](https://discuss.ai.google.dev/t/on-device-training-of-simple-autoencoder-fails-because-of-select-ops/103079)

<div class="topic-metadata">

**Author:** [@JPat\_MC](https://discuss.ai.google.dev/u/JPat_MC)\
**Replies:** 1\
**Last updated:** [November 10, 2025, 8:13pm UTC](https://discuss.ai.google.dev/t/on-device-training-of-simple-autoencoder-fails-because-of-select-ops/103079 "2025-11-10T20:13:47Z")

</div>

Hi, I am building and pre-training a basic autoencoder in Python with TF + Keras, then converting it to LiteRT “.tflite” model in order to deploy it into an ARM 32-bit Cortex-A7. Here is the model in question: NUM\_FEA…

---

## [Structured output Optional fields don't work in OpenAI SDK compatibility mode](https://discuss.ai.google.dev/t/structured-output-optional-fields-dont-work-in-openai-sdk-compatibility-mode/82329)

<div class="topic-metadata">

**Author:** [@Hayk\_Harutyunyan](https://discuss.ai.google.dev/u/Hayk_Harutyunyan)\
**Replies:** 3\
**Last updated:** [November 10, 2025, 3:39pm UTC](https://discuss.ai.google.dev/t/structured-output-optional-fields-dont-work-in-openai-sdk-compatibility-mode/82329 "2025-11-10T15:39:54Z")

</div>

If I submit a model like the below as response\_format to OpenAI structured output it won’t complain. The same isn’t the case with Gemini’s OpenAI endpoint https://generativelanguage.googleapis.com/v1beta/openai/ , which …

---

## [Is there a way to get rate limits via API?](https://discuss.ai.google.dev/t/is-there-a-way-to-get-rate-limits-via-api/40576)

<div class="topic-metadata">

**Author:** [@John\_Horton](https://discuss.ai.google.dev/u/John_Horton)\
**Replies:** 2\
**Last updated:** [October 15, 2025, 9:47pm UTC](https://discuss.ai.google.dev/t/is-there-a-way-to-get-rate-limits-via-api/40576 "2025-10-15T21:47:36Z")

</div>

With OpenAI API for example, the rate limit info is in the header: return { "rpm": int(headers\["x-ratelimit-limit-requests"\]), "tpm": int(headers\["x-ratelimit-limit-tokens…

---

## [Able to process images using TensorFlow](https://discuss.ai.google.dev/t/able-to-process-images-using-tensorflow/102234)

<div class="topic-metadata">

**Author:** [@Mustafa\_Cayci](https://discuss.ai.google.dev/u/Mustafa_Cayci)\
**Replies:** 9\
**Last updated:** [October 9, 2025, 7:46am UTC](https://discuss.ai.google.dev/t/able-to-process-images-using-tensorflow/102234 "2025-10-09T07:46:20Z")

</div>

Hello, I am newbie to TensorFlow. I apologize I wasn’t able to search the forum for this question. I want to be develop a quick application (Python) to input an image and detect certain aspects (features) from the ima…

---

## [Question about font setting in python code execution](https://discuss.ai.google.dev/t/question-about-font-setting-in-python-code-execution/100100)

<div class="topic-metadata">

**Author:** [@chingh](https://discuss.ai.google.dev/u/chingh)\
**Replies:** 5\
**Last updated:** [September 17, 2025, 6:52am UTC](https://discuss.ai.google.dev/t/question-about-font-setting-in-python-code-execution/100100 "2025-09-17T06:52:28Z")

</div>

as I using gemini 2.5 pro, and ask it to read chinese charater and draw, it will lead to square box in the plot like: I notice it try to set the font but I believe it lack these font file in the env

---

## [How can I start a new chat with custom chat history in the new Google Gen AI SDK? (python)](https://discuss.ai.google.dev/t/how-can-i-start-a-new-chat-with-custom-chat-history-in-the-new-google-gen-ai-sdk-python/54812)

<div class="topic-metadata">

**Author:** [@Ritesh](https://discuss.ai.google.dev/u/Ritesh)\
**Replies:** 4\
**Last updated:** [August 25, 2025, 8:02pm UTC](https://discuss.ai.google.dev/t/how-can-i-start-a-new-chat-with-custom-chat-history-in-the-new-google-gen-ai-sdk-python/54812 "2025-08-25T20:02:07Z")

</div>

In the previous version, we could start a new chat using chat: chat = model.start\_chat(history=chat\_history) where, we would add the history as a parameter or leave it blank. But in the new sdk, chat = client.chats.cr…

---

## [500 Internal Error when caching on Vertex API](https://discuss.ai.google.dev/t/500-internal-error-when-caching-on-vertex-api/56226)

<div class="topic-metadata">

**Author:** [@y27choi](https://discuss.ai.google.dev/u/y27choi)\
**Replies:** 1\
**Last updated:** [August 11, 2025, 9:17am UTC](https://discuss.ai.google.dev/t/500-internal-error-when-caching-on-vertex-api/56226 "2025-08-11T09:17:41Z")

</div>

Following the context caching tutorial notebook causes 500 Internal Error. I’m on google-cloud-aiplatform==1.75.0 on Python 3.12. I also tried on the Google Colab but still having the same issue.

---

## [Guidance on Building Agent with Gemini](https://discuss.ai.google.dev/t/guidance-on-building-agent-with-gemini/97606)

<div class="topic-metadata">

**Author:** [@Neel\_Odedra](https://discuss.ai.google.dev/u/Neel_Odedra)\
**Replies:** 1\
**Last updated:** [August 11, 2025, 8:39am UTC](https://discuss.ai.google.dev/t/guidance-on-building-agent-with-gemini/97606 "2025-08-11T08:39:13Z")

</div>

Hello Can anyone guide me how to get started to build agents with gemini using python. I’m beginning to get in Agentic Space Please provide me path to get started

---

## [Inpainting with Imagen](https://discuss.ai.google.dev/t/inpainting-with-imagen/46850)

<div class="topic-metadata">

**Author:** [@gurs](https://discuss.ai.google.dev/u/gurs)\
**Replies:** 1\
**Last updated:** [July 16, 2025, 9:24am UTC](https://discuss.ai.google.dev/t/inpainting-with-imagen/46850 "2025-07-16T09:24:13Z")

</div>

I am trying to inpaint using Imagen via API with Python. I am able to successfully generate images from a text prompt this way but the inpainting is failing. Specifically, the failure is that while an image is created,…

---

## [Code python weather](https://discuss.ai.google.dev/t/code-python-weather/56394)

<div class="topic-metadata">

**Author:** [@Mehdi\_Sheikh](https://discuss.ai.google.dev/u/Mehdi_Sheikh)\
**Replies:** 1\
**Last updated:** [July 14, 2025, 6:51am UTC](https://discuss.ai.google.dev/t/code-python-weather/56394 "2025-07-14T06:51:03Z")

</div>

create a code python for weather

---

## [Getting FinishReason.MALFORMED\_FUNCTION\_CALL when function calling arugments contain large amount of text content](https://discuss.ai.google.dev/t/getting-finishreason-malformed-function-call-when-function-calling-arugments-contain-large-amount-of-text-content/69488)

<div class="topic-metadata">

**Author:** [@FlinCode](https://discuss.ai.google.dev/u/FlinCode)\
**Replies:** 4\
**Last updated:** [July 11, 2025, 6:10am UTC](https://discuss.ai.google.dev/t/getting-finishreason-malformed-function-call-when-function-calling-arugments-contain-large-amount-of-text-content/69488 "2025-07-11T06:10:38Z")

</div>

In the python sdk when function calling is returned by gemini and it contains large amount of text it fails and returns malformed function call. For example i have a write\_file tool attached that takes filename and file…

---

## [Applying a Smart Text Classification System for Customer Support Tickets](https://discuss.ai.google.dev/t/applying-a-smart-text-classification-system-for-customer-support-tickets/63049)

<div class="topic-metadata">

**Author:** [@KRows](https://discuss.ai.google.dev/u/KRows)\
**Replies:** 1\
**Last updated:** [July 8, 2025, 11:59am UTC](https://discuss.ai.google.dev/t/applying-a-smart-text-classification-system-for-customer-support-tickets/63049 "2025-07-08T11:59:58Z")

</div>

I want to build a text classification system that can automatically categorize customer support tickets into predefined categories (billing, technical, account, product). The system should: Accept text input from custo…

---

## [Is there a way to use the Web UI with my API key?](https://discuss.ai.google.dev/t/is-there-a-way-to-use-the-web-ui-with-my-api-key/47103)

<div class="topic-metadata">

**Author:** [@Nova\_Spivack](https://discuss.ai.google.dev/u/Nova_Spivack)\
**Replies:** 1\
**Last updated:** [July 3, 2025, 4:02pm UTC](https://discuss.ai.google.dev/t/is-there-a-way-to-use-the-web-ui-with-my-api-key/47103 "2025-07-03T16:02:41Z")

</div>

Hi is there a way to use my API key with the Google AI Studio Web GUI? It’s the best UI for what I want to do. But it appears even if I connect my API billing account, it doesn’t work with the Google AI Studio UI. That w…

---

## [Why isn't tensorflow picking up my custom operator?](https://discuss.ai.google.dev/t/why-isnt-tensorflow-picking-up-my-custom-operator/31786)

<div class="topic-metadata">

**Author:** [@Idrees](https://discuss.ai.google.dev/u/Idrees)\
**Replies:** 1\
**Last updated:** [July 2, 2025, 7:26am UTC](https://discuss.ai.google.dev/t/why-isnt-tensorflow-picking-up-my-custom-operator/31786 "2025-07-02T07:26:21Z")

</div>

Hello! I have recently been trying to add a custom operator to tensorflow that requires me to perform a custom build. Unfortunately, I am unable to register the operator and the following error occurs in Python when the …

---

## [Gemini live api doesn't recognize screenshot images](https://discuss.ai.google.dev/t/gemini-live-api-doesnt-recognize-screenshot-images/90430)

<div class="topic-metadata">

**Author:** [@Hal2002](https://discuss.ai.google.dev/u/Hal2002)\
**Replies:** 1\
**Last updated:** [June 25, 2025, 9:57am UTC](https://discuss.ai.google.dev/t/gemini-live-api-doesnt-recognize-screenshot-images/90430 "2025-06-25T09:57:59Z")

</div>

Hi all, I’m trying to implement screensharing using the live api in an electron app i’m building. I’m using python as a backend and javascript in the front end. I’m essentially following the example code on the google ai…

---

## [Lightweight Front-End Frameworks for Python](https://discuss.ai.google.dev/t/lightweight-front-end-frameworks-for-python/67444)

<div class="topic-metadata">

**Author:** [@res8](https://discuss.ai.google.dev/u/res8)\
**Replies:** 1\
**Last updated:** [June 24, 2025, 8:17am UTC](https://discuss.ai.google.dev/t/lightweight-front-end-frameworks-for-python/67444 "2025-06-24T08:17:27Z")

</div>

Looking to convert my python scripts into a front end-framework. I’m using Anvil but would love something Google native. My ide of choice is Google colab. Know of anything?

---

## [File Upload Not working](https://discuss.ai.google.dev/t/file-upload-not-working/82090)

<div class="topic-metadata">

**Author:** [@Sdhanda](https://discuss.ai.google.dev/u/Sdhanda)\
**Replies:** 5\
**Last updated:** [June 23, 2025, 3:43pm UTC](https://discuss.ai.google.dev/t/file-upload-not-working/82090 "2025-06-23T15:43:08Z")

</div>

Hi, I am trying to upload a file to the API, and I keep getting this error. Code: from google import genai client = genai.Client() myfile = client.files.upload(file= “poem.txt”) print(f"{myfile=}") result = client.…

---

## [Gemini 2.5 Grounding Segments Indices Incorrect (with Google Search)](https://discuss.ai.google.dev/t/gemini-2-5-grounding-segments-indices-incorrect-with-google-search/75884)

<div class="topic-metadata">

**Author:** [@pcolangelo](https://discuss.ai.google.dev/u/pcolangelo)\
**Replies:** 1\
**Last updated:** [May 21, 2025, 10:47am UTC](https://discuss.ai.google.dev/t/gemini-2-5-grounding-segments-indices-incorrect-with-google-search/75884 "2025-05-21T10:47:12Z")

</div>

Hello, the grounded response structure as documented at A grounded response is intact but segment end and start indices do not align with response text. In every case that I ran with model gemini-2.5-pro-exp-03-25 resul…

---

## [Help with systemInstruction in WebSocket Invalid value at 'setup.system\_instruction' (type.googleapis.com/google.ai.generativela](https://discuss.ai.google.dev/t/help-with-systeminstruction-in-websocket-invalid-value-at-setup-system-instruction-type-googleapis-com-google-ai-generativela/72486)

<div class="topic-metadata">

**Author:** [@Mahmoud\_Ashraf](https://discuss.ai.google.dev/u/Mahmoud_Ashraf)\
**Replies:** 1\
**Last updated:** [June 22, 2025, 11:40am UTC](https://discuss.ai.google.dev/t/help-with-systeminstruction-in-websocket-invalid-value-at-setup-system-instruction-type-googleapis-com-google-ai-generativela/72486 "2025-06-22T11:40:39Z")

</div>

websockets.exceptions.ConnectionClosedError: received 1007 (invalid frame payload data) Request trace id: 2eaf9e5973e5a127, Invalid value at ‘setup.system\_instruction’ (type.googleapis.com/google.ai.generativela; then se…

---

## [400 'Invalid or unsupported file uri](https://discuss.ai.google.dev/t/400-invalid-or-unsupported-file-uri/73951)

<div class="topic-metadata">

**Author:** [@dedecun](https://discuss.ai.google.dev/u/dedecun)\
**Replies:** 5\
**Last updated:** [June 17, 2025, 10:41am UTC](https://discuss.ai.google.dev/t/400-invalid-or-unsupported-file-uri/73951 "2025-06-17T10:41:34Z")

</div>

Hey, I have been trying to " Provide a list of non function call parts", as per the Python google-genai 1.7.0 documentation, using gemini-2.0-flash, something like: contents = \[ types.Part.from\_text(‘What is this image…

---

## [Gemini API Code Execution with OpenAI Library in Python](https://discuss.ai.google.dev/t/gemini-api-code-execution-with-openai-library-in-python/82410)

<div class="topic-metadata">

**Author:** [@ratchanonth\_plumanut](https://discuss.ai.google.dev/u/ratchanonth_plumanut)\
**Replies:** 2\
**Last updated:** [June 17, 2025, 5:54am UTC](https://discuss.ai.google.dev/t/gemini-api-code-execution-with-openai-library-in-python/82410 "2025-06-17T05:54:43Z")

</div>

How can I use the Code Execution feature of the Gemini API with the OpenAI Library in Python? Please provide step-by-step instructions and a working code example. Additionally, confirm whether Gemini supports plotting gr…

---

## [Best temperature for python coding with 2.5 Pro 06-05?](https://discuss.ai.google.dev/t/best-temperature-for-python-coding-with-2-5-pro-06-05/88770)

<div class="topic-metadata">

**Author:** [@St\_Michael\_the\_Archa](https://discuss.ai.google.dev/u/St_Michael_the_Archa)\
**Replies:** 1\
**Last updated:** [June 13, 2025, 12:46pm UTC](https://discuss.ai.google.dev/t/best-temperature-for-python-coding-with-2-5-pro-06-05/88770 "2025-06-13T12:46:24Z")

</div>

What is the best temperature setting to use when generating python code for creating a video game? Thank you.

---

## [Could not handle 2600 lines of code and the changes it offered were buggy and not usable](https://discuss.ai.google.dev/t/could-not-handle-2600-lines-of-code-and-the-changes-it-offered-were-buggy-and-not-usable/70055)

<div class="topic-metadata">

**Author:** [@John\_Friedson](https://discuss.ai.google.dev/u/John_Friedson)\
**Replies:** 1\
**Last updated:** [June 13, 2025, 9:33am UTC](https://discuss.ai.google.dev/t/could-not-handle-2600-lines-of-code-and-the-changes-it-offered-were-buggy-and-not-usable/70055 "2025-06-13T09:33:50Z")

</div>

I asked it to review about 2600 lines of python code it was able to review but was not able to output complete code with revisions that kept getting truncated it offered me code snippets to plug and play with and those t…

[Previous page](https://discuss.ai.google.dev/tag/python/210.md?match_all_tags=true&tags%5B%5D=python)

[Next page](https://discuss.ai.google.dev/tag/python/210.md?match_all_tags=true&page=2&tags%5B%5D=python)
