r/pythonhelp • • Apr 02 '22

I need assistance for coding for python

When I copied a piece of code from my old laptop to my new desktop computer it wouldn't work in VS Code because "%s" would come up blue and on my old laptop it would be orange.

webbrowser.get('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe -profile-directory="Profile 1" %s').open(url)

This was the code that wasnt working.

0 Upvotes

4 comments sorted by

1

u/MT1961 Apr 02 '22

Do you have Chrome installed on your new laptop, and is it in the same location?

1

u/stormcat1228 Apr 03 '22

yes and yes

1

u/MT1961 Apr 03 '22

Not sure what you mean by colors, they have nothing to do with the code, just the way that VS Code interprets it. Is it not working? If so, does Intellisense show you any errors?

1

u/stormcat1228 Apr 04 '22

No errors but the%s turned to blue and the code wouldnt run i just figured it was that because it was the only thing that was different .when i say color i mean webbrowser turns green and the rest of the code in"" is orange but the%s turned blue and in code on old laptop it was in orange. Thanks for your time i will try another way around it