473,395 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

TypeError: send() argument 1 must be string or read-only buffer,not int


Hello

invoking something like following -

sock.send(100)

generates the following error -

TypeError: send() argument 1 must be string or read-only buffer,
not int
how can I work around this? I wish to write
msg-length on a stream socket.

thanks in advance.
manish
Jul 18 '05 #1
3 18440
if you want to send the value '1000' over a socket connection in a
socket object do something like sock.send(str(1000)) if socket is a
socket.socket object.

Jul 18 '05 #2
Hi:
I'm trying to compile python 2.4 with tkinter.
(I'm trying to write a gui interface which
calls a program called GAP - I'm hoping to use
subprocess, a python 2.4 module, since I was getting
deadlocks using popen).

The instructions at the python web site said basically
to edit the /Modules/Setup file and recompile.
The edits consist of determining with location of various
Tcl/Tk libraries, header files, etc. I was wondering if
anyone could help out with how to determine these.
I have a suse 9.1 box and a new debian laptop, both of which
I would like to configure with python 2.4 and tkinter.
- David Joyner
Jul 18 '05 #3
David Joyner wrote:
Hi:
I'm trying to compile python 2.4 with tkinter.
(I'm trying to write a gui interface which
calls a program called GAP - I'm hoping to use
subprocess, a python 2.4 module, since I was getting
deadlocks using popen).

The instructions at the python web site said basically
to edit the /Modules/Setup file and recompile.
The edits consist of determining with location of various
Tcl/Tk libraries, header files, etc. I was wondering if
anyone could help out with how to determine these.
I have a suse 9.1 box and a new debian laptop, both of which
I would like to configure with python 2.4 and tkinter.
- David Joyner

The problem is most likely missing header files for the Tcl/Tk
libraries. Most Linux distributions (including SuSE) package the
required files separately from the libraries. In Yast, look for
packages with the same name and a -dev suffix. Once you have installed
these, tkinter will be automatically built without any need to edit
/Modules/Setup.

If you are running Debian testing or unstable, you just need to install
the python2.4 and python2.4-tk modules. If you need to compile
extension modules, you will also need python2.4-dev.

Hope this helps.

Ray Buvel
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stuart Forsyth | last post by:
What can I do about this error, i am tearing my hair out! Python ActiveX Scripting Engine (0x80020009) Traceback (most recent call last): File "<Script Block >", line 58, in ? FileContents =...
0
by: Huzaifa Tapal | last post by:
I am getting this error from python 2.3.5 when making secure socket connections from my mod_python based application. It is very odd because we cannot replicate this in the development...
1
by: Namshub | last post by:
Hi I'm trying to identify the message format of a string, When i send the string via a ActiveXFormatting propery it send the string to the queue as shown below, can anyone identify the format? ...
3
by: Greg Chu | last post by:
Hi, any way to send a string directly to a file on the hard drive? Thanks! Greg
5
by: Jon Bowlas | last post by:
Hi listers, I wrote this script in Zope some time ago and it worked for a while, but now I'm getting the following error: TypeError: coercing to Unicode: need string or buffer, NoneType found ...
2
by: Mayur | last post by:
I tried followinf but working fine fo int but how to do it for string using user custome message in c# public static extern int FindWindow(string strClassName,string strWindowName);
7
by: M O J O | last post by:
Hi, What is the easiest way to send a string from one application to another? I'm develloping an OutlookAddIn and in some cases I need to make my OutlookAddIn send a string to my other (CRM)...
2
by: Iain Adams | last post by:
Hi, I am new to python. I have been having trouble using the MysqlDB. I get an error pointing from the line cursor.execute("UPDATE article SET title = %s, text = %s WHERE id = %u",...
3
by: Prajaktaj | last post by:
Hi All, I have one string variable of length of approximately 2000 characters which I am sending to the browser through URL from javascript. But the browser does not accept the string more than...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.