Python Forum
cx_freeze setup.py error: No module __SNMP-FRAMEWORK-MIB
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cx_freeze setup.py error: No module __SNMP-FRAMEWORK-MIB
#5
Ok.
I've installed pyinstaller and run it on the python script. I then made the change to the spec file but I'm getting a new error now:

C:\Users\netcomm\Documents\TerryTestPython>pyinstaller snmpTester.spec
122 INFO: PyInstaller: 3.3.1
123 INFO: Python: 3.6.4
126 INFO: Platform: Windows-10-10.0.14393-SP0
130 INFO: UPX is not available.
130 INFO: Removing temporary files and cleaning cache in C:\Users\netcomm\AppData\Roaming\pyinstaller
Traceback (most recent call last):
File "C:\Python\Python36-32\Scripts\pyinstaller-script.py", line 11, in <module>
load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
File "c:\python\python36-32\lib\site-packages\PyInstaller\__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\python\python36-32\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\python\python36-32\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\python\python36-32\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 28
SyntaxError: positional argument follows keyword argument

C:\Users\netcomm\Documents\TerryTestPython>


Here is the current spec file (I have tried using both / and \\ for the path names and both give the same error above:
# -*- mode: python -*-

block_cipher = None

hiddenimports = ['pysnmp.smi.exval','pysnmp.cache']

a = Analysis(['snmpTester.py'],
             pathex=['C:/Users/netcomm/Documents/TerryTestPython'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
x = Tree('C:/Python/Python36-32/Lib/site-packages/pysnmp/smi/mibs',prefix='pysnmp/smi/mibs',excludes='.py')
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='snmpTester',
          debug=False,
          strip=False,
          upx=True,
		  x,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               name='snmpTester')
Not sure where I go from here.
Do you have any other ideas?
Thanks.
Reply


Messages In This Thread
RE: cx_freeze setup.py error: No module __SNMP-FRAMEWORK-MIB - by nacho - Feb-19-2018, 01:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error (Errno 2), File upload with the Flask framework and a public IP Username_Python1 0 423 Mar-28-2024, 01:46 PM
Last Post: Username_Python1
  Problem with cx_freeze app only on one pc floatingshed 0 1,859 Mar-19-2021, 05:19 PM
Last Post: floatingshed
Exclamation Help with cx_Freeze mederic39 3 3,037 Jan-31-2021, 12:05 PM
Last Post: snippsat
  python setup.py install error blackclover 2 8,151 Jan-07-2021, 04:36 AM
Last Post: blackclover
  'python setup.py bdist' gets error on 'compiler_flags' 1780yz 0 2,287 Sep-02-2020, 09:17 PM
Last Post: 1780yz
  vlc module error pythonprogrammer 1 2,979 Apr-23-2020, 04:16 AM
Last Post: Larz60+
  cx_freeze frozen executive introduces WinError 10049 KipCarter 3 3,298 Jan-14-2020, 02:34 PM
Last Post: KipCarter
  Python 3.6 Alternatives to Cx_Freeze KipCarter 5 5,168 Jan-14-2020, 11:51 AM
Last Post: KipCarter
  cx_freeze exe does not work? Skycoder 4 6,501 Jan-13-2020, 06:50 PM
Last Post: KipCarter
  How to get cx_Freeze to make folders mad_accountant 0 3,215 Nov-24-2019, 02:22 PM
Last Post: mad_accountant

Forum Jump:

User Panel Messages

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