1

Hi I've installed pynsist in order to make my python files into executables but I am having some issues. The project consists of two files that I've written. The main program to be run is Filereader.py and a supplied file called spuriousReq.py which Filereader.py uses a function from. Currently my installer.cfg file looks like this

[Application]
name=WFilereader
version=1.0
entry_point=Filereader
console=true


[Python]
version=3.4.0

[Include]
packages = matplotlib
     statistics
     bisect

files = spuriousReq.py

I've moved the installer.cfg file and both python files to the C:\Python34\Scripts folder in order to access them from the cmd (Yes I am new at this..). But I get the following error which I dont know how to interpret or solve..

C:\Python34\Scripts>"C:\Python34\python.exe" "C:\Python34\Scripts\\pynsist" inst
aller.cfg
Traceback (most recent call last):
  File "C:\Python34\Scripts\\pynsist", line 3, in <module>
    main()
  File "C:\Python34\lib\site-packages\nsist\__init__.py", line 393, in main
    shortcuts = configreader.read_shortcuts_config(cfg)
  File "C:\Python34\lib\site-packages\nsist\configreader.py", line 172, in read_
shortcuts_config
    appcfg = cfg['Application']
  File "C:\Python34\lib\configparser.py", line 937, in __getitem__
    raise KeyError(key)
KeyError: 'Application'
Lucas
  • 129
  • 1
  • 12
  • Have you copied and pasted the config file exactly? That error means it can't find the Application section, so double check the spelling and formatting. There's a couple of other issues with it: your spuriousReq module should be in packages rather than files, and your entry_point should refer to a function, like `Filereader:main`. – Thomas K Jul 09 '15 at 22:34

1 Answers1

0

As mentioned in the documentation [http://pynsist.readthedocs.io/en/latest/] you need to specify the function from your 'Filereader.py' file which will be starting the execution of your script. For example if you have a 'main' function that will be the entry point or starting point of your script then you need to specify that in your 'installer.cfg' file like below:-

[Application]
name=WFilereader
version=1.0
entry_point=Filereader:main  <------ Here mention your entry point function.
console=true


[Python]
version=3.4.0

[Include]
packages = matplotlib
     statistics
     bisect

files = spuriousReq.py
Shashishekhar Hasabnis
  • 1,636
  • 1
  • 15
  • 36