At first i would get the text from an INI file "tutorial.ini" using python's ConfigParser, it works fine on my computer, the text is displayed, however when i try the app on my android mobile device, the app crash with a "NoSectionError".
So after failing a lot with ConfigParser, i decided to try with Toml, now with Toml i get a "FileNotFoundError", this one "FileNotFoundError: [Errno 2] No such file or directory: 'tutorial.toml'
here is the structure of my toml/INI file:
[gameconfig]
tutorialused = False
[gameinstruction]
instruction1 = "some text"
instruction2 = "some text 2"
Now as i said, with ConfigParser, it says that "configparser.NoSectionError: No section: 'gameconfig'".
With Toml i get the error "FileNotFoundError: [Errno 2] No such file or directory: 'tutorial.toml'
Any ideas why this is happening and hopefully how to fix it?
I have not done any Android programming – so take this with a grain of salt.
Check the file locations, and make sure you can accesses them as expected. Config parser is expecting file-like objects to read and write.
If you need to do anything Android specific the read/write the files, you could access the file as a textfile and parse using ConfigParser.read_string()
You could use the python io module to write to a StringIO object in the ConfigParser.write(), and the save the string with the Android specific code.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/10d979a3-8208-4976-94a6-6ca16fdf8fafn%40googlegroups.com.