It's all about the answers!

Ask a question

RTC5 git integration in Windows : importError: bad magic number in 'rtcprocess':


praveen patidar (8613244) | asked Sep 30 '14, 10:19 p.m.
edited Sep 30 '14, 10:21 p.m.
 Hello All,

I am doing simple RTC and GIT integration as POC on my laptop. I install the 
scm manager as I am getting huge difficulty in setting up the gitweb\sysgit\apache in windows. 

okey all fine with the SCM Manager too, I am able to get the hook triggered, but then I get the issue with the .pyc files. The error I found is due to the files are compiled in the Unix environment. there should be complete solution for windows too. I anyhow make the pre-recieve and post-recieve work with the help of cygwin. but this one is blocker for me. 

Let me know if anyone can assist me by providing the .pyc files for the windows version. hookslib and rtcprocess

files packaged. 
rtcprocess.pyc
hookslib.pyc 
ImportError: bad magic
number in 'rtcprocess':
b'\x9e\x0c\r\n'




Comments
praveen patidar commented Sep 30 '14, 10:26 p.m. | edited Sep 30 '14, 10:27 p.m.

It may be complicated to provide the pyc version for all OS, or may be this is again dependent on the version of OS as well. 

So if its possible to get the .py then it will help me to generate the PYC as per my windows version. 

Accepted answer


permanent link
Kiran M N (3262) | answered Oct 01 '14, 4:10 a.m.
JAZZ DEVELOPER
Are you using the right version of Python as mentioned in the requirements? The Python version required is 3.3.5.

If you have the right version of Python it should run with pyc files (like class files they are platform independent, but Python itself seems to be fragile across different versions of Python).

And, regarding setting up GitWeb on Windows, here's a link that might help: https://git.wiki.kernel.org/index.php/MSysGit:GitWeb (assuming that you are using msysgit)
praveen patidar selected this answer as the correct answer

2 other answers



permanent link
praveen patidar (8613244) | answered Oct 01 '14, 8:48 p.m.
edited Oct 01 '14, 9:16 p.m.

Yes I have python 3.4.X let me update that first. Apart from this to make that work in windows, I am using CYGWIN and for hooks I am using the .bat wrapper to make it run.

scm-manager from bitbucket i am using for the git hosting. Enterprise servers dont allowed us to change the existing HTTP servers in order to work with the gitweb or msysgit.

Wel the integration shoul be flexible in terms of usage. 

 What I am upto is the simple POC. we are building a cloud and I have assigned to provide POC with these tool sets creating a build pipeline.

Within 3 days I have achiveved GIT-JENKINS-MAVEN-JUNIT-SONAR-DEPLOYMENT(via Jenkins a simple).

The only thing here is I am not able to established GIT-RTC and for this I have to go through complex sysgit and gitweb integration.

now I ended up with the SCM-MANAGER and the hooks if that works then it will be fine.


Comments
Kiran M N commented Oct 06 '14, 1:50 a.m. | edited Oct 06 '14, 1:52 a.m.
JAZZ DEVELOPER

Hi Praveen,


Just a clarification: RTC and Git Integration does not require you to have GitWeb setup. Guess you are referring to Git Adapter??

Also, you said: "Wel the integration shoul be flexible in terms of usage".  Not sure if you were referring to Git-RTC integration. If so, please elaborate on the pain point and suggestion (if any)?


permanent link
praveen patidar (8613244) | answered Oct 06 '14, 2:16 a.m.
edited Oct 06 '14, 3:01 a.m.

Hello Kiran,

Let me provide you the Details.

=========What I have

Software Installed.

RTC 5,

SCM Manager for GIT ,https://bitbucket.org/sdorra/scm-manager/wiki/Home

both are working fine individually means I am able to checkin the code in GIT with the Eclipse. and RTC as usual.

=====What I am trying to achieve

I am trying to achieve the GIT -RTC Integration that has capability to link the work items with the git commits.

=====What are my pain points.

1. Earlier as in the Quetion it was the Python version issue now this got resolved.

2. I got some index issue in the program written in the ValidatePush.py, as it was checking the index as 7 or less but in the pre-recieve it is passing only 6. so I made the change as checking from 7 to 6. before that I am continuously redirected to help contain in the below if condition.

 if(argv == None or len(argv) < 6 ):
        help(ValidatePush)
        exit(1) 

3. right now I am able to push the changes but there is no validation for the work items. Just now I realized that I made the below parameter as argv[6] that makes some changes in the exclude refs. So I just changed it to arg[7]. 

       excludeRefs = argv[7]

Let me know if I am not doing it in right way. In point 2 I was just amazed that if the 7th parameter is optional then why the condition is checking 7 parameter as <7 condition. thats why I updated and it got worked. 

I haven't tested the solution after I changed to excludeRefs = argv[7], so provide me some time to check with it.

Thanks

Praveen

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.