Ich habe hier folgendes Teilstück, wo Daten aus einer Sonde empfangen werden:

        for i in range(12):
        err,data=dev.GetData()
        print data

        f.write(data)

Wenn cih das ausführe bekomme ich die Fehlermedung:
expected a character buffer object

Your loop is not indented inside the for.

Please stick to english. I understand german, but this is an english forum...

In which line do you get the error?
What is this dev object?
What is the f object?

Hi ,
sorry for writing in german. I was so concentrated solving this, I didn`t realise.
The Error appears in the last line. The Code is intended in the loop alredy.

 for i in range(12):
        err,data=dev.GetData()
        print data

        f.write(data)

By the way: I am using the Notepad editor.

Thanks for helping. Manja

Maybe data is not a string.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.