pavlohrab / RemNote-bot

Small telegram bot to send notes into RemNote daily document.
MIT License
13 stars 2 forks source link

Doesn't work #1

Open zendude213 opened 3 years ago

zendude213 commented 3 years ago

I'm sure I probably just put in the details incorrectly. But it would help a lot if you can provide a sample bot.py file with example user defined variables filled in (e.g. sample token, remnote api, etc...) so I'd actually know. It isn't clear to me whether I actually accurately followed the instructions (i.e. did i copy the right text fragment from telegram api?, etc...) and so a sample file would help immensely. I also noticed another user had what could be similar source of issue in discord

Attached is a pix of error CleanShot 2021-03-01 at 02 34 06

arunnbabu81 commented 3 years ago

I was also not able to make it work. Don't know why. I had posted about that in detail in the discord However someone in the remnote forum posted this. Don't know whether its the same telegram bot or not. For that user it seems to be working.

pavlohrab commented 3 years ago

Oh, I definitely should configure e-mail notifications....

I am on it right now. Stay tuned(:

pavlohrab commented 3 years ago

Well, I wasn't able to spot the cause of the issue... :disappointed:

Fixed some global links, but I am not sure if they caused your problem. For now, at master branch is located code, that was tested and should work. Furthermore, I added the example_bot branch, which holds the version of the bot which definitely works (as @zendude213 requested) with all user-defined variables already filled. All the details about this example are located in the README file at example_bot branch.

Please let me know if the problem persists!

arunnbabu81 commented 3 years ago

I tried the individual version again today. There was no response from the bot if I send some text or images. Again nothing was getting saved . And the Heroku app log was looking like this - syntax error it seems

image image

If I remember correctly I was getting an invalid telegram token error last time when I reported the bug to you in discord . Check the image below image

General bot also I tried. But nothing is getting saved in my remnote. When I send a text, a message came asking where to save. On selecting where to save, a small loading icon/message comes and goes. When I send a video, a message comes "Link detected. Are you trying to embed a video - yes/no". On selecting one of them, again a loading message comes and goes. Nothing more is happening.

I badly want this bot in my workflow. Somehow it's not working. Can you make a short video on how to set it up in loom or YouTube. May be then I can understand what's wrong on my side.

zendude213 commented 3 years ago

Still having issues

Don't quite understand. I revoked and regenerated telegram bot token and it's 46 characters long just like yours. However my string has an "_" character as part of the total.

My Remnote User ID has 17 characters vs 24 in yours

My Heroku name has the full html string... not sure if yours only has the name of the name as part of full string

CleanShot 2021-03-11 at 13 08 19

zendude213 commented 3 years ago

Hey @pavlohrab There's a telegram bot I found for Logseq that has ridiculously awesome features... I wonder if it's possible to repurpose for Remnote? https://github.com/akhater/Lupin

anojo commented 3 years ago

@zendude213 This wasn't working for me, but it seems to work after deleting lines 271-280 from bot.py.

arunnbabu81 commented 3 years ago

@anojo can you share the bot.py file you used. Even after deleting the lines 271-280 from bot.py file, I couldn't make it work. I was getting the same syntax error as before in my Heroku app logs.

image
anojo commented 3 years ago

@arunnbabu81 It's just like the original with the custom data and those lines removed, so the function there becomes:

# First menu hangling
def daily_docs(update, context):
    """Echo the user message."""
    global LINK, DOCUMENT, NOTE, NOTE_ID, SEPARATE
    SEPARATE = False
    query = update.callback_query
    query.answer()
    if LINK == True:
        query.edit_message_text(text = fifth_menu_message(), 
                            reply_markup=fifth_menu_keyboard())
        return FIFTH
    else:
        NOTE_ID = send_note(text=NOTE, link=LINK)
        query.edit_message_text(text = first_menu_message(), 
                            reply_markup=first_menu_keyboard())
        return SECOND
arunnbabu81 commented 3 years ago

@anojo I am getting the same syntax error message in my Heroku app even after deleting those lines. Any guesses what might be the problem? I am using a MacBook.

anojo commented 3 years ago

I barely know anything about this, but you can try running heroku local from the repo folder to test quicky whether you've been able to fix the syntax error or you get the same error from the heroku logs.

mkagit commented 3 years ago

2021-04-19T01:13:33.467626+00:00 app[web.1]: SyntaxError: positional argument follows keyword argument 2021-04-19T01:13:37.709203+00:00 heroku[web.1]: Starting process with command python3 bot.py 2021-04-19T01:13:40.138641+00:00 heroku[web.1]: Process exited with status 1 2021-04-19T01:13:40.204931+00:00 heroku[web.1]: State changed from starting to crashed 2021-04-19T01:13:40.064326+00:00 app[web.1]: File "/app/bot.py", line 282 2021-04-19T01:13:40.064354+00:00 app[web.1]: return SECOND