Skip to content

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

@pedrom-hd

Description

@pedrom-hd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions