lzzy12 / python-aria-mirror-bot

A telegram bot for all your mirror needs | OG Repo
https://t.me/pythonmirrorsupport
GNU General Public License v3.0
736 stars 1.3k forks source link

Runtime error while generating user session string #142

Closed elbert505 closed 4 years ago

elbert505 commented 4 years ago

Hello,

I face this error while generating session string using :

~/mirror-bot (master) $ python generate_string_session.py Enter API KEY: ## Enter API HASH: ## C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\client\client.py:242: RuntimeWarning: coroutine 'Client.stop' was never awaited self.stop() RuntimeWarning: Enable tracemalloc to get the object allocation traceback Traceback (most recent call last): File "generate_string_session.py", line 6, in print(app.export_session_string()) AttributeError: 'coroutine' object has no attribute 'export_session_string' sys:1: RuntimeWarning: coroutine 'Client.start' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback

I've unsuccessfully tried to fix this by adding await delay, maybe due to misplacement. Any suggestions?

Thank you.

ghost commented 4 years ago

Try this wget https://raw.githubusercontent.com/CW4RR10R/archives/master/pyro-session.py && pip install pyrogram tgcrypto && python3 pyro-session.py

lzzy12 commented 4 years ago

Make sure you have Python 3.6 or above. Pyrogram have problems with python versions below 3.6.

ghost commented 4 years ago

@lzzy12 on my installed 3.8.5 but getting error -_-

elbert505 commented 4 years ago

Try this wget https://raw.githubusercontent.com/CW4RR10R/archives/master/pyro-session.py && pip install pyrogram tgcrypto && python3 pyro-session.py

Thanks for the suggestion, however it doesn't work. Same error as previous. :(

@lzzy12 Using Python 3.8.4rc1

lzzy12 commented 4 years ago

You are trying it in Windows?

Try it in a Linux distro. If you don't have a Linux distro install WSL or just do it on the VPS on which you'll be hosting it on (assuming it is probably going to be a Linux distro?)

elbert505 commented 4 years ago

@lzzy12 That's exactly what i was thinking, but had issues with WSL & VMs. Ended up with a wubi setup yesterday and now i can successfully generate the user string on Ubuntu. Thank you. Though the telegram bot gives no response. I'm starting to giveup. :/

ghost commented 4 years ago

@lzzy12 That's exactly what i was thinking, but had issues with WSL & VMs. Ended up with a wubi setup yesterday and now i can successfully generate the user string on Ubuntu. Thank you. Though the telegram bot gives no response. I'm starting to giveup. :/

  • Is it possible to deploy in Ubuntu without docker? If yes, how do i deploy without docker?
  • And, would this work in Heroku?

Heroku support ended

AlbionWhite07 commented 4 years ago

@elbert505 - No support without docker

elbert505 commented 4 years ago

@tomyprs25 @AlbionWhite07 Okay, thanks for clarifying. I was hoping to run with Heroku atleast to test run DDLs and give me some victory, before deciding to drop the project, since running locally looks bleak for me.

elbert505 commented 4 years ago

And i've no idea why noobs can do this successfully, while myself with enough experience to carry out a project with this complexity couldn't figure it out even after weeks!

lzzy12 commented 4 years ago

And i've no idea why noobs can do this successfully, while myself with enough experience to carry out a project with this complexity couldn't figure it out even after weeks!

Most of your problems are caused by Windows. Do you have a VPS to host the bot on?

elbert505 commented 4 years ago

And i've no idea why noobs can do this successfully, while myself with enough experience to carry out a project with this complexity couldn't figure it out even after weeks!

Do you have a VPS to host the bot on?

I had AWS free tier but ended up being charged due to EBS fineprints, and misunderstanding their metrics like GB-mo for GB. Which is why i went ahead with Ubuntu for my local machine.

Trying to get ahold of one of those VPS with free student packs with no luck, so my local Ubuntu is the best bet for now.

AlbionWhite07 commented 4 years ago

@elbert505 Get gcp trial, it's the best option if you want to host mirror bot.

elbert505 commented 4 years ago

@AlbionWhite07 There were some issues which prevented me from created a Payments profile in GCP, despite charging me the $1 token amount multiple times. Support triangulated it to my cards being virtual, and advised to use real plastic but i was hesitant after AWS charges and virtual cards allowed me to set a max limit. Seems like I'll need to resort to that.

I don't mean to go offtopic but, do you use your real card for GCP?

AlbionWhite07 commented 4 years ago

@elbert505 Join off-topic chat in Telegram if you want to talk about that, group link should be in readme

ghost commented 4 years ago

Close issue

elbert505 commented 4 years ago

Thanks for all the response. I'll give it a fresh start after some time. Closing as original issue has been solved.