Sign In

Communications of the ACM

ACM TechNews

Bug in Python Script May Have Affected Hundreds of Studies


View as: Print Mobile App Share: Send by email Share on reddit Share on StumbleUpon Share on Hacker News Share on Tweeter Share on Facebook
An actual python.

University of Hawaii researchers discovered a coding error in a set of Python scripts that yielded significantly different outcomes for different operating systems.

Credit: Getty Images

University of Hawaii (UH) researchers discovered a coding error in a set of Python scripts often used for computational analysis of chemistry data that yielded significantly different outcomes, depending on which operating system (OS) was used.

This has cast doubt on more than 150 published studies that employed the Willoughby-Hoye scripts, which returned correct results on macOS Mavericks and Windows 10, yet were off by almost 1% on macOS Mojave and Ubuntu.

This variation is rooted in the scripts' use of Python's glob module, which seeks out files matching a specific name pattern, but relies on the OS for the sequence in which those files are returned.

The results of script calculations also are impacted by the order of file processing; UH's Rui Sun and Phillip Williams wrote sorting code that corrects the error.

From Ars Technica
View Full Article

 

Abstracts Copyright © 2019 SmithBucklin, Washington, DC, USA


 

No entries found