Vinyzu / Botright

Botright, the most advance undetected, fingerprint-changing, captcha-solving, open-source automation framework. Build on Playwright, its as easy to use as it is to extend your code. Solving your Captchas for free with AI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.local/lib/python3.10/site-packages/botright/fingerprint_generator\\fingerprints.json'

lxntagram opened this issue · comments

Describe the bug
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.local/lib/python3.10/site-packages/botright/fingerprint_generator\fingerprints.json'
Code Sample

import asyncio

import botright


async def main():
    botright_client = await botright.Botright()
    browser = await botright_client.new_browser()
    page = await browser.new_page()

    # Continue by using the Page
    await page.goto("https://google.com")

    await botright_client.close()

if __name__ == "__main__":
    asyncio.run(main()) 

To Reproduce
Steps to reproduce the behavior:

Installing models/objects.yaml: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.00k/3.00k [00:00<00:00, 7.69MB/s]
[WARNING] Ungoogled Chromium not found. Recommended for stealthier botright and Canvas Manipulation. Download at https://ungoogled-software.github.io/ungoogled-chromium-binaries/ 
Traceback (most recent call last):
  File "/home/ubuntu/Desktop/workspace/Discord/v3 (copy)/test/a.py", line 17, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/ubuntu/Desktop/workspace/Discord/v3 (copy)/test/a.py", line 7, in main
    botright_client = await botright.Botright()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/async_class.py", line 173, in __await__
    yield from self.create_task(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/botright/botright.py", line 69, in __ainit__
    self.fingerprint_generator = FingerprintGenerator(os_dict[platform.system()])
  File "/home/ubuntu/.local/lib/python3.10/site-packages/botright/fingerprint_generator/fingerprint.py", line 20, in __init__
    self.bayesian_network = BayesianNetwork(path=rf"{os.path.dirname(os.path.abspath(__file__))}\fingerprints.json")
  File "/home/ubuntu/.local/lib/python3.10/site-packages/botright/fingerprint_generator/bayesian_network.py", line 109, in __init__
    with open(path, 'r', encoding='utf-8') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.local/lib/python3.10/site-packages/botright/fingerprint_generator\\fingerprints.json'

Expected behavior
just did pip install botright, playwright install and running the script and getting this error

Screenshots

Desktop (please complete the following information):

  • OS: ubuntu
  • Version 22.04.3 LTS x86_64

Additional context
Did pip install botright, playwright install again and still getting same error

\\fingerprints.json \\ ?

Fixed by editing the source /botright/fingerprint_generator/bayesian_network.py

I love you bro, thank you for this