<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div><font size="3" face="Arial">Thanks for the information Cole,</font></div><div><font size="3" face="Arial"><br></font></div><div><font size="3" face="Arial">Installing pycurl was challenge ;-)</font></div><div><font size="3" face="Arial"><br></font></div><div><font size="3" face="Arial">However, I've installed python-request and latest python-bugzilla version from Git. </font></div><div><font size="3" face="Arial"><br></font></div><div><font size="3" face="Arial">But still I have problem while attaching the file. File get corrupted (that was my actual problem).</font></div><pre style="line-height: 21px; white-space: normal; color: rgb(68, 68, 68);"><font size="3" face="Arial"><br></font></pre><pre style="line-height: 21px; white-space: normal; color: rgb(68, 68, 68);"><font size="3" face="Arial">I am using "attachfile" method.</font></pre><pre><font color="#444444" size="3" face="Arial"><span style="line-height: 21px; white-space: normal;"> def attachfile(self, idlist, attachfile, description, **kwargs):</span></font></pre><pre><font size="3" face="Arial"><font color="#444444"><span style="line-height: 21px; white-space: normal;">and </span></font><span style="color: rgb(68, 68, 68); line-height: 21px; white-space: normal;"> _detect_filetype(fname) and "python </span><font color="#444444"><span style="line-height: 21px; white-space: normal;">magic" methods implemented in base.py but still file(s) (.zip, .jpeg etc) get corrupted after uploading on Bugzilla.. </span></font></font></pre><div><font size="3" face="Arial"><br></font></div><pre style="line-height: 21px; white-space: normal; color: rgb(68, 68, 68); font-size: 15px;">//Mahboob</pre><pre style="line-height: 21px; white-space: normal; color: rgb(68, 68, 68); font-size: 15px;"><pre style="white-space: normal;"><br></pre></pre><br><div>> Date: Thu, 14 Nov 2013 09:12:44 -0500<br>> From: crobinso@redhat.com<br>> To: khokhar_cth@live.com<br>> CC: python-bugzilla@lists.fedorahosted.org<br>> Subject: Re: [python-bugzilla] How to attach file ?<br>> <br>> On 11/14/2013 09:11 AM, Khokhar cth wrote:<br>> > Thanks Cole,<br>> > <br>> > I have start using "python-bugzilla *0.9.0*" (I assume this is latest one<br>> > ?)with python 2.7.<br>> > <br>> > This version using "pycurl" so i've installed curl and pycurl but still I have<br>> > problems.<br>> > <br>> > I've installed successfully "[curl-7.33.0-win64.msi][1]" and<br>> > "[pycurl-7.19.0.2.win-amd64-py2.7.exe][2]"<br>> > <br>> > <br>> > I got following Error:<br>> > <br>> > import pycurl importError: DLL load failed: The specified procedure could<br>> > not be found<br>> > <br>> > File "C:\cc_stg\Git\bugzilla\cgi-bin\newbugs_lag.py", line 3, in <module><br>> > import create_bugzillas<br>> > File "C:\cc_stg\Git\bugzilla\cgi-bin\create_bugzillas.py", line 2, in<br>> > <module><br>> > import bugzilla<br>> > File "C:\cc_stg\Git\bugzilla\cgi-bin\bugzilla\__init__.py", line 21, in<br>> > <module><br>> > from bugzilla.base import BugzillaError<br>> > File "C:\cc_stg\Git\bugzilla\cgi-bin\bugzilla\base.py", line 19, in <module><br>> > import pycurl<br>> > ImportError: DLL load failed: The specified procedure could not be found.<br>> > <br>> > <br>> > <br>> > I have no idea how to fix this issue. Any help will be appreciated.<br>> > <br>> > <br>> > [1]: http://www.confusedbycode.com/curl/<br>> > [2]: http://www.lfd.uci.edu/~gohlke/pythonlibs/<br>> > <br>> > Thanks in advance,<br>> > <br>> > //Mahboob<br>> > <br>> <br>> Ahh, didn't realize you are running on windows. I can't really help you there<br>> unfortunately. However latest python-bugzilla in git actually switched away<br>> from pycurl and to python-requests, which is a native python library, which<br>> may be simpler to use on windows than pycurl.<br>> <br>> - Cole<br>> <br>> > <br>> > <br>> > <br>> >> Date: Wed, 13 Nov 2013 10:14:25 -0500<br>> >> From: crobinso@redhat.com<br>> >> To: khokhar_cth@live.com<br>> >> CC: python-bugzilla@lists.fedorahosted.org<br>> >> Subject: Re: [python-bugzilla] How to attach file ?<br>> >><br>> >> On 11/13/2013 10:09 AM, Khokhar cth wrote:<br>> >> > Hi Cole,<br>> >> ><br>> >> > Thanks for the hint.<br>> >> ><br>> >> > Now I am on next stage.File has been uploaded successfully but it got<br>> > corrupted.<br>> >> ><br>> >> > I got this problem while uploading file by using attachfile function of<br>> >> > python-bugzilla (inside base.py).<br>> >> ><br>> >> > I am using python-bugzilla-0.8.0.<br>> >> ><br>> >> > Here is my code:<br>> >> ><br>> >> > downloaded_file = "abc.zip"<br>> >> > att_file_desc = "Attached file description"<br>> >> ><br>> >> > kwards = {<br>> >> > 'contenttype':'application/octet-stream',<br>> >> > 'filename': downloaded_file<br>> >> > }<br>> >> ><br>> >> > # attachfile method will return the id of attached file<br>> >> > bz.attachfile( bug_id, downloaded_file, att_file_desc, **kwards)<br>> >> ><br>> >> ><br>> >> > Could you please guide me where I am doing mistake ?<br>> >> ><br>> >> > Thanks in advance,<br>> >> ><br>> >> ><br>> >> > //Mahboob<br>> >><br>> >> At the very least, please try with the latest python-bugzilla release, but<br>> >> trying to reproduce with python-bugzilla git first is preferred.<br>> >><br>> >> - Cole<br>> <br></div>                                            </div></body>
</html>