python - wxpython PyEmbeddedImage Unicode error? -
i try follow tutorial embed image in python (wxpython). getting following error:
typeerror: string or unicode type required
in line:
bmp = wx.image(plane.geticon(), wx.bitmap_type_bmp)
what's wrong code?:
plane = pyembeddedimage( "ivborw0kggoaaaansuheugaaacaaaaagcayaaabzenr0aaaabhncsvqicagifahkiaaabgvj" "refuwixtknlq1guyx7+/3wwbxwm5f4rflh1mnzr1uymbw1tmcm3runhrxswuxtioggeiqekp" "j/pwvejfviiuffbsn664n3oj5vgc2wvpyje93/5okrm4kpvxdz///d739zzf7/n9h+ajjyng" "ty2+j6kpier0sc6vri66ikvqxmu+pb4pel9q9flrtpf+i7ite4na/lllzeboiwa4/2gpfrq2" "99rl0kb+2g0lvcohwg+d0/j3n8imxp6ngdwbmfeohjot1z/uy9qgtm3hdeu13cr5wzx55drz" "2co68gpzzefzivcbjoxgnpavi75ubq8lao6re7aaop4j1taepjibwa/uglze1fy1ypewdanj" "nwn7x5nfh5sd0ozrvhuzypggaphe76wv7nozmwoux5s1gtnduqolo3iwrpnktq6qnimezmyv" "jqxgiyerpxo8hqp57yauybugol9dthildhns1xdnfcmztoc+1eudo/bakgd1flg3pvhjjxjj" "64uq2tlbt21zlza8etqvnqxnd9fklaaff8cjn43wyoilpuzq+7pjs1axe0o2virab6n+wqqa" "sktj/d8sbr57vmeklzwoypomnvkj0zgzp2vibeuuq8keg94awl4cmm1brxdnylgxrdklif0k" "jcm52/fr9dt/jrsskkfsrcv1bsl3dybx63we1kbgmshfuljprjrrz+wl01aq14ngaxqme4re" "ptiujpkxikqvxk6msg8xiznph85oukyhdl6sg3w6mkxbytt46cx2jkpr8oq+10q9mzy8pjej" "des3/n9zwgfjl3olfdr2nuu9awgub8mmlht2ahhnfqjju7hudwibspnhseeasx6chtuakz4s" "a5fzpk49oyam+dqlqc9syr3l9zpwmvw12ak7v8kf32lhhx91argvf6lioltpqu78elrwbkxf" "umqu8jyexs6v0/bqqbkbehbudqivawqoughuuql+up1uwstjjnkpw0dkfxhmcqfgxthl2cgo" "ilep9dp5kwmswi7tcghxhzk3xqx3fkgemkaycnhbwqokda4t3lyw1d+p2xvynrwxu3/vnpkb" "exdgzsdte95in7dncvvsyiwcipgxcksaqdtbmlc4jyhcyixwapl1ghonydqho6ulhcpv8lni" "linetejycp2h3ahvpl1+sravoyagkwrdfakvr8uew5pmqkcvaiircs41ovx0mz3x3y04bxee" "udfbabaomhec4gfxcn/jdihnpwo9wcfu6wapg3ucobmof5/4qxtjjvttjrvv7h/lcwfdzoxo" "abrygchpmedm+wrerudfev2pybjr5ua5sw0nzy+exoki9ysk4ylwfjp6tfywnjnqaaag/6ll" "nsjtfmgo/npv1fp91ien9ezevhrxbvq2yddtzgief2oidf12gg4tug1i4sy5rrs3dsstowsz" "rzaghwaad64ajn4iuzegp8noljeqspgplymkj6kcarnoixt0gc2w0ujolnwda3etfi5yfsay" "uomnp03nejfol8p0pzlfnusq0hg9tkn6vcrspfctmy0aklrurjywhifvi+l5ouqpoddu13gc" "u3p6w3olcdacingbi+9knydqxnl++ck6y2loybvtr+q+yzubyfstays1xkxij4odxus4n8xb" "hpb7auyuj7ky05m/wcciargyohzqkputia0mflvpblolttrv3z+9yivg6snpvsgmx7l11apx" "pvajj88mitmydknd/tsdc/6byzp7v1z/sst7uyuhc6azzw+9tfc0tith7ltf/+l2zs7ks72f" "7hnfhk9f/artrsllxwqyv62pjbxoikxf+6zxgak7tr97ntpueo2gox6fu5eoi1aerjevzj+v" "cbyukkngxq2zmvvwqw0t+rgbaxcpbgk54tlobm7fkonmnhiclnhvszp0nvu7u8r/i/jdnjbg" "tp3zjofa76vleyvxwjzrm7ivwjjspjvdkunr8l3mfukxior2gxvikxbf4/zmm+nriv8dvil9" "fglnk71qgmhx+q6qysspofx/t+gtnvcex4pfalybxd1svtncaaaaaelftksuqmcc") bmp = wx.image(plane.geticon(), wx.bitmap_type_bmp) self.button = wx.bitmapbutton(header, -1, bmp, pos=(10, 20), style=wx.no_border)
i watched around in other tuts find no solution. thanks
you shouldn't need create generic image pyembeddedimage, can use getbitmap method:
# plane image, f frame btn = wx.bitmapbutton(f, -1, plane.getbitmap())
Comments
Post a Comment