TheCommsChannel / TC2-BBS-mesh

A BBS server for Meshtastic for posting bulletins, sending mail to users, and channel directory.
GNU General Public License v3.0
300 stars 54 forks source link

Sometimes no Response of using Menu #95

Open Neppumuck opened 2 weeks ago

Neppumuck commented 2 weeks ago

Hi, i installed the BBS on raspberry pi 4. I don´t use Docker. Cloned the GIT yesterday. I can use the BBS, but i don´t get an answer when i do follow things:

Quick Commands: CM = OK SM = i get TC2 BBS Menu PB = i get TC2 BBS Menu CB = i get TC2 BBS Menu Maybe my mistake - don´t know the correct syntax?

BBS Menu: Mail = all R,S,X work fine BBS = all G,I,N,U work fine (BTW how can Post be delete or changed?) Channel = V: OK, P: i dont´get an answer. In Debug see no Reaction. He see the "P" or "p" but nothing happens.

Utilities Menu: Stats = H,R work fine, N: I get an error that i Post below Fortune = OK Wall of Shame= OK

Please excuse me if I expressed myself in a complicated manner. Can you please help find the errors? Thank you in advance Greetings Neppu

The Code when i use Stats from Nodes:

2024-11-03 14:27:21 - ERROR - Unexpected error in deferred execution <class 'TypeError'>
Traceback (most recent call last):
  File "/root/TC2-BBS-mesh/venv/lib/python3.11/site-packages/meshtastic/util.py", line 297, in _run
    o()
  File "/root/TC2-BBS-mesh/venv/lib/python3.11/site-packages/meshtastic/mesh_interface.py", line 1383, in <lambda>
    lambda: pub.sendMessage(topic, packet=asDict, interface=self)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/publisher.py", line 216, in sendMessage
    topicObj.publish(**msgData)
  File "/root/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/topicobj.py", line 452, in publish
    self.__sendMessage(msgData, topicObj, msgDataSubset)
  File "/root/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/topicobj.py", line 482, in __sendMessage
    listener(data, self, allData)
  File "/root/TC2-BBS-mesh/venv/lib/python3.11/site-packages/pubsub/core/listener.py", line 237, in __call__
    cb(**kwargs)
  File "/root/TC2-BBS-mesh/server.py", line 71, in receive_packet
    on_receive(packet, interface)
  File "/root/TC2-BBS-mesh/message_processing.py", line 203, in on_receive
    process_message(sender_id, message_string, interface, is_sync_message=False)
  File "/root/TC2-BBS-mesh/message_processing.py", line 146, in process_message
    handle_stats_steps(sender_id, message, step, interface)
  File "/root/TC2-BBS-mesh/command_handlers.py", line 138, in handle_stats_steps
    total_nodes = sum(1 for node in interface.nodes.values() if node.get('lastHeard', 0) >= time_limit)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/TC2-BBS-mesh/command_handlers.py", line 138, in <genexpr>
    total_nodes = sum(1 for node in interface.nodes.values() if node.get('lastHeard', 0) >= time_limit)
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
Neppumuck commented 2 weeks ago

command_handlers.py / Line 383 must be : elif choice.lower() == 'p':