GithubHelp home page GithubHelp logo

Comments (11)

noam09 avatar noam09 commented on August 23, 2024

Hi @qwertyhgfdsa, thanks for the detailed logs.
It seems as though one or more of the torrents in the list contains unicode characters (I'm guessing Russian) and the various list commands lead to encoding/decoding issues with the output. I'll see if I can reproduce this on my end and try to push a fix for you to try out.

from deluge-telegramer.

qwertyhgfdsa avatar qwertyhgfdsa commented on August 23, 2024

I have no torrents with Russian characters, but, maybe, they contains UTF-8

from deluge-telegramer.

noam09 avatar noam09 commented on August 23, 2024

@qwertyhgfdsa please try the latest release and post any debug logs if the error persists.

from deluge-telegramer.

qwertyhgfdsa avatar qwertyhgfdsa commented on August 23, 2024

OK, I tried it, but it is still not working.
There is one error when plugin starting:

[INFO    ] 23:38:22 daemon:127 Deluge daemon 1.3.15
[INFO    ] 23:38:22 core:87 Starting libtorrent 1.0.11.0 session..
[INFO    ] 23:38:22 rpcserver:369 Starting DelugeRPC server localhost:58846
[INFO    ] 23:38:22 pluginmanagerbase:158 Plugin Scheduler enabled..
[INFO    ] 23:38:22 pluginmanagerbase:158 Plugin AutoRemovePlus enabled..
[INFO    ] 23:38:22 core:97 *** Start Label plugin ***
[INFO    ] 23:38:22 pluginmanagerbase:158 Plugin Label enabled..
[ERROR   ] 23:38:23 __init__:57 Appending to sys.path: '/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/include'
[INFO    ] 23:38:24 core:191 2018-02-14 23:38:23 # Telegramer: Enable
[INFO    ] 23:38:24 pluginmanagerbase:158 Plugin Telegramer enabled..
[INFO    ] 23:38:24 torrentmanager:651 Successfully loaded state file: /home/z/.config/deluge/state/torrents.state
[INFO    ] 23:38:24 torrentmanager:780 Successfully loaded fastresume file: /home/z/.config/deluge/state/torrents.fastresume
[INFO    ] 23:38:25 rpcserver:206 Deluge Client connection made from: 127.0.0.1:58914
[INFO    ] 23:38:25 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection los$
[INFO    ] 23:38:27 rpcserver:206 Deluge Client connection made from: 127.0.0.1:58915
[INFO    ] 23:38:27 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection los$
[WARNING ] 23:38:27 core:131 check interval loop starting

And second error when I send "/list" to the bot:

[INFO    ] 23:41:34 torrentmanager:780 Successfully loaded fastresume file: /home/z/.config/deluge/state/torrents.fastresume
[INFO    ] 23:41:34 torrentmanager:826 Saving the fastresume at: /home/z/.config/deluge/state/torrents.fastresume
[ERROR   ] 23:41:43 core:177 'ascii' codec can't decode byte 0xd0 in position 7: ordinal not in range(128)
[ERROR   ] 23:41:43 dispatcher:293 An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/include/telegram/ext/dispatcher.py", line 271, in process_u$
    handler.handle_update(update, self)
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/include/telegram/ext/commandhandler.py", line 180, in handl$
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/core.py", line 389, in cmd_list
    self.telegram_send(self.list_torrents(lambda t:
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/core.py", line 735, in list_torrents
    if filter(t)] or [STRINGS['no_items']])
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/core.py", line 178, in format_torrent_info
    return status_string
UnboundLocalError: local variable 'status_string' referenced before assignment
[INFO    ] 23:41:44 torrentmanager:737 Saving the state at: /home/z/.config/deluge/state/torrents.state

from deluge-telegramer.

qwertyhgfdsa avatar qwertyhgfdsa commented on August 23, 2024

I remove all torrents, and add only this one. No Russian characters, only unicode, but error still here:

[INFO    ] 23:57:43 core:712 2018-02-14 23:57:43 # Telegramer: Sending torrent added message to ['111111111']
[INFO    ] 23:57:43 torrentmanager:540 Torrent SDI_RUS added by user: localclient
[ERROR   ] 23:58:12 core:177 'ascii' codec can't decode byte 0xd0 in position 6: ordinal not in range(128)
[ERROR   ] 23:58:12 dispatcher:293 An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/include/telegram/ext/dispatcher.py", line 271, in process_update
    handler.handle_update(update, self)
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/include/telegram/ext/commandhandler.py", line 180, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/core.py", line 389, in cmd_list
    self.telegram_send(self.list_torrents(lambda t:
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/core.py", line 735, in list_torrents
    if filter(t)] or [STRINGS['no_items']])
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.3-py2.7.egg/telegramer/core.py", line 178, in format_torrent_info
    return status_string
UnboundLocalError: local variable 'status_string' referenced before assignment
[INFO    ] 23:58:24 torrentmanager:737 Saving the state at: /home/z/.config/deluge/state/torrents.state

from deluge-telegramer.

noam09 avatar noam09 commented on August 23, 2024

Please try the latest release (v1.1.7.4) and post debug logs.

from deluge-telegramer.

qwertyhgfdsa avatar qwertyhgfdsa commented on August 23, 2024

A little bit better! =)

[INFO    ] 19:47:42 daemon:127 Deluge daemon 1.3.15
[INFO    ] 19:47:43 core:87 Starting libtorrent 1.0.11.0 session..
[INFO    ] 19:47:43 rpcserver:369 Starting DelugeRPC server localhost:58846
[INFO    ] 19:47:43 pluginmanagerbase:158 Plugin Scheduler enabled..
[INFO    ] 19:47:43 pluginmanagerbase:158 Plugin AutoRemovePlus enabled..
[INFO    ] 19:47:43 core:97 *** Start Label plugin ***
[INFO    ] 19:47:43 pluginmanagerbase:158 Plugin Label enabled..
[ERROR   ] 19:47:43 __init__:57 Appending to sys.path: '/home/z/.config/deluge/plugins/Telegramer-1.1.7.4-py2.7.egg/telegramer/include'
[INFO    ] 19:47:44 core:193 2018-02-16 19:47:44 # Telegramer: Enable
[INFO    ] 19:47:44 pluginmanagerbase:158 Plugin Telegramer enabled..
[INFO    ] 19:47:44 torrentmanager:651 Successfully loaded state file: /home/z/.config/deluge/state/torrents.state
[INFO    ] 19:47:44 torrentmanager:780 Successfully loaded fastresume file: /home/z/.config/deluge/state/torrents.fastresume
[INFO    ] 19:47:44 torrentmanager:540 Torrent SDI_RUS added by user:
[INFO    ] 19:47:46 rpcserver:206 Deluge Client connection made from: 127.0.0.1:51936
[INFO    ] 19:47:46 rpcserver:206 Deluge Client connection made from: 127.0.0.1:51937
[INFO    ] 19:47:46 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection lost.
[INFO    ] 19:47:46 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection lost.
[WARNING ] 19:47:48 core:131 check interval loop starting
[INFO    ] 19:47:50 rpcserver:206 Deluge Client connection made from: 127.0.0.1:51938
[ERROR   ] 19:48:06 core:179 2018-02-16 19:48:06 # Telegramer: 'ascii' codec can't decode byte 0xd0 in position 5: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.4-py2.7.egg/telegramer/core.py", line 175, in format_torrent_info
    status_string = u''.join([f(status[i], status) for i, f in INFO_DICT if f is not None])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 5: ordinal not in range(128)

[WARNING ] 19:48:06 dispatcher:281 A TelegramError was raised while processing the Update
[WARNING ] 19:48:06 core:284 Update "{'_effective_chat': {'username': u'Test_qwerty', 'first_name': u'Test', 'last_name': u'qwerty', 'type': u'private', 'id': 123123123}, 'message': {'delete_chat_photo': False, 'new_chat_photo': [], 'from': {'username': u'Test_qwerty', 'first_name': u'Test', 'last_name': u'qwerty', 'is_bot': False, 'language_code': u'ru', 'id': 123123123}, 'text': u'/list', 'entities': [{'length': 5, 'type': u'bot_command', 'offset': 0}], 'channel_chat_created': False, 'new_chat_members': [], 'supergroup_chat_created': False, 'chat': {'username': u'Test_qwerty', 'first_name': u'Test', 'last_name': u'qwerty', 'type': u'private', 'id': 123123123}, 'photo': [], 'date': 1518799686, 'group_chat_created': False, 'message_id': 92, 'new_chat_member': None}, '_effective_user': {'username': u'Test_qwerty', 'first_name': u'Test', 'last_name': u'qwerty', 'is_bot': False, 'language_code': u'ru', 'id': 123123123}, 'update_id': 146254814}" caused error "Message text is empty"
[INFO    ] 19:50:55 torrentmanager:780 Successfully loaded fastresume file: /home/z/.config/deluge/state/torrents.fastresume
[INFO    ] 19:50:55 torrentmanager:826 Saving the fastresume at: /home/z/.config/deluge/state/torrents.fastresume
[INFO    ] 19:51:04 torrentmanager:737 Saving the state at: /home/z/.config/deluge/state/torrents.state
[ERROR   ] 19:53:43 updater:287 Error while getting Updates: Timed out
[WARNING ] 19:53:43 core:284 Update "None" caused error "Timed out"

And may be this debug.log help you?

from deluge-telegramer.

noam09 avatar noam09 commented on August 23, 2024

Other than the single torrent which causes the error, does the /list command return all other torrents? Or does it return nothing?
Currently I'm unable to reproduce the error on my system with the same torrent file. Could it be a system locale issue?

from deluge-telegramer.

qwertyhgfdsa avatar qwertyhgfdsa commented on August 23, 2024

from deluge-telegramer.

qwertyhgfdsa avatar qwertyhgfdsa commented on August 23, 2024

@noam09 > Currently I'm unable to reproduce the error on my system with the same torrent file. Could it be a system locale issue?

May be... UTF-8 is in my system as default

 cat /etc/default/locale
#  File generated by update-locale
LANG="ru_RU.UTF-8"

from deluge-telegramer.

noam09 avatar noam09 commented on August 23, 2024

Closing, re-open if it comes up again.

from deluge-telegramer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.