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] Too many errors reported, unable to run #54

Open
12189108 opened this issue Apr 28, 2024 · 0 comments
Open

[BUG] Too many errors reported, unable to run #54

12189108 opened this issue Apr 28, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@12189108
Copy link

Describe the bug
My Python version is 3.9. Since you didn't mention your version, I assumed all versions were compatible, but encountered many errors.
error 1 :

 File "/usr/local/lib/python3.9/dist-packages/transformers/utils/import_utils.py", line 1510, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/local/lib/python3.9/dist-packages/transformers/models/vit/image_processing_vit.py", line 21, in <module>
    from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
ImportError: cannot import name 'BaseImageProcessor' from partially initialized module 'transformers.image_processing_utils' (most likely due to a circular import) (/usr/local/lib/python3.9/dist-packages/transformers/image_processing_utils.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/recaptcha_solver_test/main.py", line 81, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/root/recaptcha_solver_test/main.py", line 78, in main
    await run(playwright,"free.vps.vc","6Lf6qrMjAAAAAK3VbiN3PkzoXux6p3kEVDmBJA5p")
  File "/root/recaptcha_solver_test/main.py", line 71, in run
    await challenger.solve_recaptcha()
  File "/usr/local/lib/python3.9/dist-packages/recognizer/agents/playwright/async_control.py", line 204, in solve_recaptcha
    return await self.handle_recaptcha()
  File "/usr/local/lib/python3.9/dist-packages/recognizer/agents/playwright/async_control.py", line 149, in handle_recaptcha
    result_clicked = await self.detect_tiles(prompt, area_captcha)
  File "/usr/local/lib/python3.9/dist-packages/recognizer/agents/playwright/async_control.py", line 83, in detect_tiles
    response, coordinates = self.detector.detect(prompt, image, area_captcha=area_captcha)
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 288, in detect
    detection_models.check_loaded()
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 76, in check_loaded
    raise e
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 66, in check_loaded
    future.result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 433, in result
    return self.__get_result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 60, in _load_seg_processor
    self.seg_processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
  File "/usr/local/lib/python3.9/dist-packages/transformers/processing_utils.py", line 465, in from_pretrained
    args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/transformers/processing_utils.py", line 509, in _get_arguments_from_pretrained
    attribute_class = getattr(transformers_module, class_name)
  File "/usr/local/lib/python3.9/dist-packages/transformers/utils/import_utils.py", line 1501, in __getattr__
    value = getattr(module, name)
  File "/usr/local/lib/python3.9/dist-packages/transformers/utils/import_utils.py", line 1500, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/usr/local/lib/python3.9/dist-packages/transformers/utils/import_utils.py", line 1512, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.vit.image_processing_vit because of the following error (look up to see its traceback):
cannot import name 'BaseImageProcessor' from partially initialized module 'transformers.image_processing_utils' (most likely due to a circular import) (/usr/local/lib/python3.9/dist-packages/transformers/image_processing_utils.py)

error 2:

File "/root/recaptcha_solver_test/main.py", line 71, in run
    await challenger.solve_recaptcha()
  File "/usr/local/lib/python3.9/dist-packages/recognizer/agents/playwright/async_control.py", line 204, in solve_recaptcha
    return await self.handle_recaptcha()
  File "/usr/local/lib/python3.9/dist-packages/recognizer/agents/playwright/async_control.py", line 149, in handle_recaptcha
    result_clicked = await self.detect_tiles(prompt, area_captcha)
  File "/usr/local/lib/python3.9/dist-packages/recognizer/agents/playwright/async_control.py", line 83, in detect_tiles
    response, coordinates = self.detector.detect(prompt, image, area_captcha=area_captcha)
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 342, in detect
    response = self.clip_detector.detect_image(cv2_images, label)
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 237, in detect_image
    return self.clipseg_detect_rd64(combined_image, task_type, len(images))
  File "/usr/local/lib/python3.9/dist-packages/recognizer/components/detector.py", line 200, in clipseg_detect_rd64
    inputs = detection_models.seg_processor(text=segment_label, images=[image], return_tensors="pt")
AttributeError: 'DetectionModels' object has no attribute 'seg_processor'

error 3:

huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)

Desktop (please complete the following information):

  • OS: Debian
  • Version 11
@12189108 12189108 added bug Something isn't working help wanted Extra attention is needed labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant