Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Alessandro Stammes
5,185 PointsCan anyone help with this error: ValueError: invalid literal for int() with base 10: '2, 7, 30, 1, 3, 400, 2'
I am running the code using PyCharm. Created a subdirectory called numbers. If I do import os, os.getcwd() it shows I'm in the right directory for running the bogostort and load scripts. I guess I'm a little confused with what sys.argv[1] is doing. Is the 1 pointing to the subdirectory? If so, it should work, right?
1 Answer
Steven Parker
243,266 PointsIt looks like the code is trying to convert a string of numbers separated by commas and spaces into a single numeric value, which is causing an error. But the solution isn't clear from just the error.
Please show more of (preferably all) the code, and provide a link to the course page you are working with.