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

TypeError: expected string or bytes-like object #102

Closed
sentient-ai69 opened this issue Oct 29, 2024 · 9 comments
Closed

TypeError: expected string or bytes-like object #102

sentient-ai69 opened this issue Oct 29, 2024 · 9 comments

Comments

@sentient-ai69
Copy link

File "/home/ubuntu/notpixel/notpixel/main.py", line 13, in
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/notpixel/notpixel/main.py", line 8, in main
await process()
File "/home/ubuntu/notpixel/notpixel/bot/utils/launcher.py", line 115, in process
await run_tasks(tg_clients=tg_clients)
File "/home/ubuntu/notpixel/notpixel/bot/utils/launcher.py", line 140, in run_tasks
await asyncio.gather(*tasks)
File "/home/ubuntu/notpixel/notpixel/bot/core/tapper.py", line 1512, in run_tapper
await Tapper(tg_client=tg_client).run(proxy=proxy)
File "/home/ubuntu/notpixel/notpixel/bot/core/tapper.py", line 1368, in run
if re.search("http://", proxy):
File "/usr/lib/python3.10/re.py", line 200, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
Unclosed client session
client_session: <aiocfscrape.CloudflareScraper object at 0x7bd6be23dae0>

@sentient-ai69
Copy link
Author

My .env file. I’ve removed the API ID and API Hash but it’s there in the actual file.

API_ID=xxxxxx
API_HASH=xxxxxxxxx

USE_REF=
REF_ID=
PERCENT_OF_REFERRALS_FOR_CREATORS_OF_THE_SOFT=

USE_RANDOM_DELAY_IN_RUN=
RANDOM_DELAY_IN_RUN=

SLEEP_TIME_IN_MINUTES=

ENABLE_AUTO_TASKS=
ENABLE_AUTO_DRAW=
UNSAFE_ENABLE_JOIN_TG_CHANNELS=
ENABLE_CLAIM_REWARD=
ENABLE_AUTO_UPGRADE=

ENABLE_AUTO_JOIN_TO_SQUAD_CHANNEL=
ENABLE_AUTO_JOIN_TO_SQUAD=
SQUAD_SLUG=

DISABLE_IN_NIGHT=
NIGHT_TIME=

ENABLE_CHECK_UPDATED_IMAGE_MODE=
ENABLE_SERVER_MODE=

ENABLE_RANDOM_CUSTOM_TEMPLATE=
RANDOM_TEMPLATE_IDS=

ENABLE_DRAW_CUSTOM_TEMPLATE=
CUSTOM_TEMPLATE_ID=

ENABLE_SSL=

PAINT_REWARD_MAX=
ENERGY_LIMIT_MAX=
RE_CHARGE_SPEED_MAX=

BOOSTS_BLACK_LIST=
TASKS_TODO_LIST=

USE_PROXY_FROM_FILE=False
OPEN_TEMPLATES_LIST_IN_BROWSER=

@THMaST3R
Copy link

same here

1 similar comment
@garnatka
Copy link

same here

@pllusin
Copy link

pllusin commented Oct 29, 2024

Same Here

@MojtabaMirbaqeri
Copy link

I have same issue

1 similar comment
@bacnd
Copy link

bacnd commented Oct 29, 2024

I have same issue

@bacnd
Copy link

bacnd commented Oct 29, 2024

I fixed the bug, open the tapper.py file in the path /notpixel/bot/core. Update like below

image

@pllusin
Copy link

pllusin commented Oct 30, 2024

I fixed the bug, open the tapper.py file in the path /notpixel/bot/core. Update like below

image

copy and replace this code :)


        if isinstance(proxy, str) and re.search("http://", proxy):
            self.image_scraper_proxies: dict[str, str] = {"http": proxy}
        elif isinstance(proxy, str) and re.search("https://", proxy):
            self.image_scraper_proxies: dict[str, str] = {"http": proxy.replace('https://', 'http://'), "https": proxy}
        elif isinstance (proxy, str) and re.search("socks5://", proxy):
            self.image_scraper_proxies: dict[str, str] = {"http": proxy.replace('socks5://', 'http://'), "socks5": proxy}
     

@YarmolenkoD
Copy link
Owner

@sentient-ai69 @THMaST3R @pllusin Already fixed.

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

7 participants