[Python] How to name a text file after data from an entry box in Tkinter.

... that meant "it would be nice to see some context so we can actually help you".

If I were to hazard a guess... It seems as if you'd like to access an object you did not initialize beforehand - or initialized incorrectly. This may be due to a line were you try to assign that object to a variable and try to do stuff with the object at the same time.

example:

# this works: 
# lower(object) is a function of the str[ing] built-in type
# and returns a str object

upperString = "HELLO WORLD!"
lowerString = str.lower(upperString)
assert lowerString == "hello world!"

# this, however, does not work:
# lower(), in this case, is a method of the upperString object
# and changes upperString without returning anything
# therefore assigning None (as in "nothing was returned") 
# to the lowerString variable

upperString = "HELLO WORLD!"
lowerString = upperString.lower()
# the assertion fails
assert lowerString == "hello world!"
/r/learnprogramming Thread Parent