AgentOps-AI / AgentOps-AI/agentops

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

Đang mở
#1,260 4 bình luận 6 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
5.8k
Fork
619
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Contact Details

pedrorjbr@gmail.com

### 📦 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.