YarmolenkoD / notpixel

Python automation tool for interact with telegram Notpixel bot (WITH GETTING X3 POINTS). Initial code base was forked from other repository https://github.com/vadymfedorets/notpixel.
https://t.me/hcmarket_bot?start=referral_355876562
176 stars 45 forks source link

TypeError: expected string or bytes-like object #102

Closed sentient-ai69 closed 2 weeks ago

sentient-ai69 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

same here

garnatka commented 2 weeks ago

same here

pllusin commented 2 weeks ago

Same Here

MojtabaMirbaqeri commented 2 weeks ago

I have same issue

bacnd commented 2 weeks ago

I have same issue

bacnd commented 2 weeks ago

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

image

pllusin commented 2 weeks ago

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 commented 2 weeks ago

@sentient-ai69 @THMaST3R @pllusin Already fixed.