Out with the old, in with the new

The migration of Python from 2 to 3 has given some unprecedented troubles to Python developers. There are variety of differences between the two, and the biggest pain is the fact that new packages and bundles do not really have a great support to Python 2. To add to the despair, the errors encountered are the not the true reflection of the trouble going on inside the actual code.

After being certain with the Reticulate and its application in writing the new rdataretriever functions, I faced an absolute shock when the test where failing in Windows 10 machine with Python 2.7. It ate up almost 15 days, because I was trying to find the root of the trouble at the wrong places.

My first instinct was the difference in operating system. The first time I tried running Reticulate was on Windows 8 machine, and as it is very well known that Windows 10 has a few weak links when it comes to developing and is not an operating system that can be relied on when it comes to creating new stuff.

But since, working on rdataretriever with Reticulate includes trying and testing on various permutation of different OS, virtual and normal environments, RStudio and R terminal, the pursuit of root cause becomes very difficult and time consuming. Therefore, I was trying to find a pattern in the system permutation, but it was nowhere to be found.

I had prepared my mind, to accept that the work done with Reticulate would need to be terminated and new code will be required to be written to make things work lucidly. After, confronting the situation to my mentor, he suggested to notice the difference with Python versions (which I never took into consideration) and test again. And Voila ! it worked. I realised the difference between the “old” and the “new” the hard way, but henceforth, I will develop the new codes in Python 3.

Related