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

I tried this bot but gets the same error everytime I try can u help me #1

Open
techie311 opened this issue Feb 10, 2022 · 3 comments
Open

Comments

@techie311
Copy link

techie311 commented Feb 10, 2022

I forked
changed repo in app.json and readme.md > heroku template
deployed ok
after I send /start in the bot
it doesn't work

got the log from heroku says some error
couldn't figure out

the log from heroku

2022-02-10T09:39:38.968173+00:00 app[api]: Enable Logplex by user (my mail)
2022-02-10T09:39:39.308412+00:00 app[api]: Release v3 created by user (my mail)
2022-02-10T09:39:39.308412+00:00 app[api]: Set API_ID, API_HASH, USER_SESSION_STRING, BOT_SESSION_NAME, BOT_TOKEN, CHANNEL_ID config vars by user (my mail)
2022-02-10T09:39:40.000000+00:00 app[api]: Build started by user (my mail)
2022-02-10T09:40:03.344974+00:00 app[api]: Deploy by user (my mail)
2022-02-10T09:40:03.344974+00:00 app[api]: Release v4 created by user (my mail)
2022-02-10T09:40:12.000000+00:00 app[api]: Build succeeded
2022-02-10T09:40:13.287069+00:00 app[api]: Scaled to worker@1:Free by user (my mail)
2022-02-10T09:40:16.558901+00:00 heroku[worker.1]: Starting process with command python3 main.py
2022-02-10T09:40:17.357949+00:00 heroku[worker.1]: State changed from starting to up
2022-02-10T09:42:13.109141+00:00 app[worker.1]: 'NoneType' object has no attribute 'write'
2022-02-10T09:42:13.109152+00:00 app[worker.1]: Traceback (most recent call last):
2022-02-10T09:42:13.109153+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 222, in handler_worker
2022-02-10T09:42:13.109154+00:00 app[worker.1]: await handler.callback(self.client, *args)
2022-02-10T09:42:13.109155+00:00 app[worker.1]: File "/app/main.py", line 30, in start_handler
2022-02-10T09:42:13.109156+00:00 app[worker.1]: await event.reply_text(
2022-02-10T09:42:13.109158+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/types/messages_and_media/message.py", line 918, in reply_text
2022-02-10T09:42:13.109158+00:00 app[worker.1]: return await self._client.send_message(
2022-02-10T09:42:13.109159+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/messages/send_message.py", line 128, in send_message
2022-02-10T09:42:13.109159+00:00 app[worker.1]: r = await self.send(
2022-02-10T09:42:13.109159+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/advanced/send.py", line 77, in send
2022-02-10T09:42:13.109160+00:00 app[worker.1]: r = await self.session.send(
2022-02-10T09:42:13.109160+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/session/session.py", line 362, in send
2022-02-10T09:42:13.109160+00:00 app[worker.1]: return await self._send(data, timeout=timeout)
2022-02-10T09:42:13.109160+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/session/session.py", line 291, in _send
2022-02-10T09:42:13.109161+00:00 app[worker.1]: message = self.msg_factory(data)
2022-02-10T09:42:13.109161+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/session/internals/msg_factory.py", line 37, in call
2022-02-10T09:42:13.109162+00:00 app[worker.1]: len(body)
2022-02-10T09:42:13.109162+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/core/tl_object.py", line 76, in len
2022-02-10T09:42:13.109162+00:00 app[worker.1]: return len(self.write())
2022-02-10T09:42:13.109162+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/functions/messages/send_message.py", line 131, in write
2022-02-10T09:42:13.109163+00:00 app[worker.1]: b.write(self.reply_markup.write())
2022-02-10T09:42:13.109163+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/types/reply_inline_markup.py", line 66, in write
2022-02-10T09:42:13.109163+00:00 app[worker.1]: b.write(Vector(self.rows))
2022-02-10T09:42:13.109163+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/core/primitives/vector.py", line 58, in new
2022-02-10T09:42:13.109163+00:00 app[worker.1]: + [cast(bytes, t(i)) if t else i.write() for i in value]
2022-02-10T09:42:13.109163+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/core/primitives/vector.py", line 58, in
2022-02-10T09:42:13.109163+00:00 app[worker.1]: + [cast(bytes, t(i)) if t else i.write() for i in value]
2022-02-10T09:42:13.109164+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/types/keyboard_button_row.py", line 66, in write
2022-02-10T09:42:13.109164+00:00 app[worker.1]: b.write(Vector(self.buttons))
2022-02-10T09:42:13.109164+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/core/primitives/vector.py", line 58, in new
2022-02-10T09:42:13.109164+00:00 app[worker.1]: + [cast(bytes, t(i)) if t else i.write() for i in value]
2022-02-10T09:42:13.109164+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/raw/core/primitives/vector.py", line 58, in
2022-02-10T09:42:13.109164+00:00 app[worker.1]: + [cast(bytes, t(i)) if t else i.write() for i in value]
2022-02-10T09:42:13.109164+00:00 app[worker.1]: AttributeError: 'NoneType' object has no attribute 'write'

I'm a newbie
help me please

@AbirHasan2005
Copy link
Owner

What u edited?
Can you show your commits?

@techie311
Copy link
Author

techie311 commented Feb 11, 2022

Screenshot (108)
Screenshot (106)
these won't affect the main code right ??
this is for private use that's y i changed them else I won't

@techie311 techie311 reopened this Feb 11, 2022
@techie311
Copy link
Author

sry my bad

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

2 participants