agentops icon indicating copy to clipboard operation
agentops copied to clipboard

[Bug]: charmap and No module named 'openai.resources.beta.chat'

Open pedrom-hd opened this issue 3 months ago • 1 comments

Contact Details

[email protected]

📦 Package Version

agentops==0.4.21

🎞️ Framework Version

langchain==0.3.27

🔎 Describe the Bug

🖇 AgentOps: [OPENAI INSTRUMENTOR] Error setting up OpenAI streaming wrappers: No module named 'openai.resources.beta.chat' 🖇 AgentOps: You're on the agentops free plan 🤔 --- Logging error --- Traceback (most recent call last): File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\logging_init_.py", line 1154, in emit stream.write(msg + self.terminator) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f914' in position 66: character maps to Call stack: File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1014, in _bootstrap self._bootstrap_inner() File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1043, in _bootstrap_inner self.run() File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 994, in run self._target(*self._args, **self._kwargs) File "C:\Projects\sah-event-hub.venv\Lib\site-packages\agentops\client\client.py", line 140, in run_async_auth asyncio.run(self._fetch_auth_async(api_key)) File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\asyncio\runners.py", line 195, in run return runner.run(main) File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\asyncio\base_events.py", line 712, in run_until_complete self.run_forever() File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\asyncio\base_events.py", line 683, in run_forever self._run_once() File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\asyncio\base_events.py", line 2050, in _run_once handle._run() File "C:\Users\pedro.magalhaes\AppData\Local\Programs\Python\Python313\Lib\asyncio\events.py", line 89, in _run self._context.run(self._callback, *self._args) File "C:\Projects\sah-event-hub.venv\Lib\site-packages\agentops\client\client.py", line 99, in _fetch_auth_async response = await self.api.v3.fetch_auth_token(api_key) File "C:\Projects\sah-event-hub.venv\Lib\site-packages\agentops\client\api\versions\v3.py", line 57, in fetch_auth_token logger.info(

🤝 Contribution

  • [ ] Yes, I'd be happy to submit a pull request with these changes.
  • [ ] I need some guidance on how to contribute.
  • [ ] I'd prefer the AgentOps team to handle this update.

pedrom-hd avatar Sep 22 '25 22:09 pedrom-hd

This happened on me too

Force1ess avatar Oct 29 '25 08:10 Force1ess

I encountered the same issue. My dependency versions are:

  • openai == 2.8.1
  • openai-agents == 0.6.1
  • agentops == 0.4.21

coxine avatar Nov 30 '25 15:11 coxine