Problem with lightblueobex_server.c

  • Cristian Orellana

    Hi Blam!

    I'm having a problem when a new file arrives (by the way, the program is working almost perfect, just this little problem from time to time), the problem is I'm getting this error message when a new file arrives: "ValueError: specified file object does not have 'write' method for Put request". The error it's almost random.

    Checking lightblueobex_server.c it seems you do a verification to see if the file can be writen when a put request arrive to the server

    if (obex_cmd == OBEX_CMD_PUT && self->hasbodydata && !PyObject_HasAttrString(tmpfileobj, "write"))
            obexserver_errorstr(self, PyExc_ValueError,"specified file object does not have 'write' method for Put request");
            return NULL;

    So I'm trying to understand where is the problem, maybe tmpfileobj isn't created properly?

    Please help, any hint its welcomed. ;)


    • blam

      blam - 2008-05-22

      That's there to check that the tmpfileobj actually has a write() method so that it doesn't try to call write() on the object if it doesn't actually have that method. It would print that message if you're passing something to recvfile() that isn't actually a file object, and thus doesn't have a write() method.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks