Python Forum
help mising 1 required posisitional rgument
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help mising 1 required posisitional rgument
#11
python3.7.0 modul documentation
arbitrary argument list
Reply
#12
I would suggest that you go over that material again.
In your code you have a positional argument file. Then in the function body you "expect" it to have write method in order your code to work. However you pass as first argument "Hello" which is str and does not have write method.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020