monsoonsoldier / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Having trouble passing a string into shedskin'd modules #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In fake.py (name doesn't change anything):
def gimme_str(a):
    return a

if __name__=='__main__':
    gimme_str('AOE')

Then run shedskin -e fake.py && make && python -c 'from fake import gimme_str; 
gimme_str("anything")'

It returns:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: error in conversion to Shed Skin (string expected)

I've tried a lot of variations like ' vs ", not sure how else I can pass in a 
string. I even tried chr(100) and chr(100)+chr(100) to no avail (both in 
fake.py and the shell). This is occurring in 0.7 and 0.7.1, python 2.6. Works 
fine when it's not a module.

Original issue reported on code.google.com by fahh...@gmail.com on 28 Feb 2011 at 5:31

GoogleCodeExporter commented 8 years ago
thanks! I'm not sure why this doesn't work for you.. it works fine here in any 
case (standard ubuntu 10.10). is there anything unusual about your setup..?

Original comment by mark.duf...@gmail.com on 28 Feb 2011 at 8:38

GoogleCodeExporter commented 8 years ago
I don't think so... I just ran git pull and sudo ./setup.py install to upgrade. 
I have the same issue with integers and the rest. I tried the 
"shedskin...python -c" bit inside shedskin's source and from ~/tmp/ and the 
same thing happened. I'll try on another machine later.

Original comment by fahh...@gmail.com on 28 Feb 2011 at 9:48

GoogleCodeExporter commented 8 years ago
strange.. I'd be very interested if you get any furter with this!

Original comment by mark.duf...@gmail.com on 1 Mar 2011 at 9:10

GoogleCodeExporter commented 8 years ago
Even stranger: I updated to python2.6 for something else and no problem 
anymore. Tried running everything through 2.5 (shedskin, the shell, etc) any no 
problem. My system was in a weird state, go ahead and close/delete this ticket.

Original comment by fahhem%r...@gtempaccount.com on 2 Mar 2011 at 4:51

GoogleCodeExporter commented 8 years ago
:-) thanks in any case for reporting the problem!

Original comment by mark.duf...@gmail.com on 2 Mar 2011 at 9:44