Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Random "You uploaded an unsupported image" #7

Open
Van0SS opened this issue Jul 19, 2024 · 0 comments
Open

Bug: Random "You uploaded an unsupported image" #7

Van0SS opened this issue Jul 19, 2024 · 0 comments

Comments

@Van0SS
Copy link

Van0SS commented Jul 19, 2024

On 40th minute happened:
You uploaded an unsupported image. Please make sure your image is below 20 MB in size and is of one the following formats: ['png', 'jpeg', 'gif', 'webp'].", 'type': 'invalid_request_error'

But last screen_1.png is ~850KB

00:41:10 - Traceback (most recent call last):
  File "/Users/van0ss/git/oss/ProctorAI/src/main.py", line 140, in <module>
00:41:10 -     main(model_name=args.model_name, tts=args.tts, cli_mode=args.cli_mode, voice=args.voice, delay_time=args.delay_time, initial_delay=args.initial_delay, countdown_time=args.countdown_time, user_name=args.user_name, print_CoT=args.print_CoT, two_tier=args.two_tier, router_model_name=args.router_model)
00:41:10 -   File "/Users/van0ss/git/oss/ProctorAI/src/main.py", line 121, in main
    control_sequence(*control_args)
  File "/Users/van0ss/git/oss/ProctorAI/src/main.py", line 82, in control_sequence
    determination, total_cost = model_pipeline(model, judge_model, config[user_prompt_label].format(user_spec=user_spec), total_cost, image_filepaths, print_CoT=print_CoT)
00:41:10 -                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/van0ss/git/oss/ProctorAI/src/main.py", line 21, in model_pipeline
    response = model.call_model(user_prompt, system_prompt=config["system_prompt"], image_paths=image_filepaths)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/van0ss/git/oss/ProctorAI/src/api_models.py", line 155, in call_model
00:41:10 -     response = self.client.chat.completions.create(
               ^^^^00:41:10 - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/van0ss/git/oss/ProctorAI/focusenv/lib/python3.11/site-packages/openai/_utils/_utils.py", line 277, in wrapper
00:41:10 -     return func(*args, **kwargs)
00:41:10 -            ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/van0ss/git/oss/ProctorAI/focusenv/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 590, in create
00:41:10 -     return self._post(
           ^^^^^^^^^^^00:41:10 - 
  File "/Users/van0ss/git/oss/ProctorAI/focusenv/lib/python3.11/site-packages/openai/_base_client.py", line 1240, in post
00:41:10 -     return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
00:41:10 -                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/van0ss/git/oss/ProctorAI/focusenv/lib/python3.11/site-packages/openai/_base_client.py", line 921, in request
00:41:10 -     return self._request(
           ^^^^^^^^^^^^^^
  File "/Users/van0ss/git/oss/ProctorAI/focusenv/lib/python3.11/site-packages/openai/_base_client.py", line 1020, in _request
00:41:10 -     raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': "You uploaded an unsupported image. Please make sure your image is below 20 MB in size and is of one the following formats: ['png', 'jpeg', 'gif', 'webp'].", 'type': 'invalid_request_error', 'param': None, 'code': 'sanitizer_server_error'}}

Python 3.11.5
MacOS: 14.5 (23F79) ARM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant