• Mystic Python errors

    From Gryphon@46:1/116 to g00r00 on Mon May 9 10:27:42 2016
    g00r00,

    I've finally had a need to play around with the mystic python apps. I'm
    trying to see what I can do with it. I'm quite frequently getting the below error, even when I can find no error like it that applies within my code.

    Can you shed some light on what this could mean?

    TypeError: function takes exactly 1 argument (0 given)

    The code looks like this:

    def show_buff():
    for x in input_buffer:
    writeln(x)

    I can't see why it would give me this error. I don't think it is a python error. So that leaves it as a Mystic error.

    "No matter where you go, there you are!" - Buckaroo Bonzai

    --- Mystic BBS v1.12 A13 (Raspberry Pi)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX (46:1/116)
  • From g00r00@46:1/127 to Gryphon on Wed May 11 02:33:22 2016
    trying to see what I can do with it. I'm quite frequently getting the below error, even when I can find no error like it that applies within
    my code.

    Can you give actual working example of the failure? There isn't enough code here for me to see what is happening.

    --- Mystic BBS v1.12 A14 (Windows)
    * Origin: Sector 7 [Mystic BBS WHQ] (46:1/127)
  • From Gryphon@46:1/116 to g00r00 on Wed May 11 08:26:03 2016
    On 05/11/16, g00r00 said the following...

    trying to see what I can do with it. I'm quite frequently getting th below error, even when I can find no error like it that applies withi my code.

    Can you give actual working example of the failure? There isn't enough code here for me to see what is happening.


    Here's the error I get:
    PYTHON ERROR:
    File "chat_client.mpy", line 85, in <module>
    File "/usr/lib/python2.7/socket.py", line 189, in __init__
    for method in _delegate_methods:
    TypeError: function takes exactly 1 argument (0 given)


    Here's the code snippet, with line numbers:
    -----------------------
    03:import socket, select, string, sys
    04:import time
    05:from mystic_bbs import *
    ...
    77:if __name__ == "__main__":
    78:
    79:
    80: host = "localhost"
    81: port = 5000
    82: user = thisuser["handle"]
    83: userlen=len(user)
    84:
    85: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    86: s.settimeout(2)
    87:
    88: try :
    89: s.connect((host, port))
    90: except :
    91: add2chat('Unable to connect')
    92: exit_app();

    As you can see, it's giving an error when I try to use the socket.socket() module in /usr/lib/python2.7/socket.py.

    In my socket.py file, I find this:
    185:def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None): 186: if _sock is None:
    187: _sock = _realsocket(family, type, proto)
    188: self._sock = _sock
    189: for method in _delegate_methods:
    190: setattr(self, method, getattr(_sock, method))

    The _delegate_methods is listed as follows:

    164:_delegate_methods = ("recv", "recvfrom", "recv_into", "recvfrom_into",
    165: "send", "sendto")

    ----------------------------------------
    HTH

    "No matter where you go, there you are!" - Buckaroo Bonzai

    --- Mystic BBS v1.12 A13 (Raspberry Pi)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX (46:1/116)
  • From g00r00@46:1/127 to Gryphon on Wed May 11 13:17:59 2016
    Here's the error I get:
    PYTHON ERROR:

    I responded on FSX-GEN. Feel free to post here or there.

    --- Mystic BBS v1.12 A14 (Windows)
    * Origin: Sector 7 [Mystic BBS WHQ] (46:1/127)