Python Forum
configparser module, when use text file to show following error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
configparser module, when use text file to show following error
#1
import configparser

config = configparser.ConfigParser()
#config.read("E:\\My Folders\\Alnafi\\AlNafi\\configparser_Ex3.ini") # when we use .ini file then out put is ok
config.read_file("E:\\My Folders\\Alnafi\\AlNafi\\configparser_Ex3.txt")
config.sections()
Error:
MissingSectionHeaderError: File contains no section headers. file: '<???>', line: 1 'E'
-----------
Reply


Messages In This Thread
configparser module, when use text file to show following error - by mbilalshafiq - Jul-13-2020, 04:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert text from an image to a text file Evil_Patrick 5 4,334 Jul-30-2019, 07:57 PM
Last Post: DeaD_EyE
  reading text file and writing to an output file precedded by line numbers kannan 7 10,525 Dec-11-2018, 02:19 PM
Last Post: ichabod801
  Login Module Help - Comparing data in a text file to data held in a variable KeziaKar 0 2,272 Mar-08-2018, 11:41 AM
Last Post: KeziaKar

Forum Jump:

User Panel Messages

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