-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Unable to debug a Python code sample #4296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
## initial place to store the dictionaries
cache = {}
## define a function to count the words
def countWords(fileName):
filename = {}
for line in infile:
words = line.split()
words = words.strip(' ,"!.?:;')
for word in words:
if word in fileName:
fileName[word] = fileName[name] + 1
else:
fileName[word]= 1
return filename
## prompt the user to enter the file name
fileName = ('Enter the name of a file: ')
infile = open( fileName , 'r',)
## checking if the file has been read before
if fileName in cache:
print('ok')
else: ##### create a function
cache [fileName] = countWords (fileName)
infile.close()
## display the dictionary of the file that we have read
for word in sorted(fileName):
print("%s: %d" % (word, fileName[word])) |
@Galopanama, thanks for letting us know about this problem. Sorry for the delay. You said "that is the message that I receive". What message are you talking about? The message you quoted suggested that you include a traceback in your error report. Please include that. |
@RajeshSivadasan, that sounds like a different problem. In fact, it sounds like it could be a duplicate of several issues: #4223, #4463, or #4238. If it is not one of those then please open a new issue. Thanks! |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off. |
Environment data
Expected behaviour
Visual Studio is not reading the program that I try to run
Actual behaviour
that is the message that I receive. And when I try to follow the links, I received a message such as:
Internal error detected. Please copy the above traceback and report at
https://github.com/Microsoft/vscode-python/issues/new
Press Enter to close. . .''')
Steps to reproduce:
Exercise1_1st attemp copia.pdf
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: