All Apps and Add-ons

SplunkWeb will not start after upgrading to Splunk 8.0.0 due to "SyntaxError: invalid syntax"

LukeMurphey
Champion

SplunkWeb will not start after upgrading to 8.0.0. web_service.log includes the following message:

2019-11-12 18:34:59,331 ERROR   [5dcafb52437f3b120e8d90] root:770 - invalid syntax (LookupFileEditor.py, line 69)
Traceback (most recent call last):
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/root.py", line 132, in <module>
    from splunk.appserver.mrsparkle.controllers.top import TopController
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/top.py", line 27, in <module>
    from splunk.appserver.mrsparkle.controllers.admin import AdminController
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/admin.py", line 25, in <module>
    from splunk.appserver.mrsparkle.controllers.appinstall import AppInstallController
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/appinstall.py", line 22, in <module>
    from splunk.appserver.mrsparkle.lib import module
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/module.py", line 465, in <module>
    moduleMapper = ModuleMapper()
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/module.py", line 83, in __init__
    self.installedModules = self.getInstalledModules()
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/module.py", line 28, in helper
    return f(*a, **kw)
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/module.py", line 448, in getInstalledModules
    mods = self.getModuleList(root)
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/module.py", line 37, in helper
    return f(*a, **kw)
  File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/module.py", line 223, in getModuleList
    mod = __import__(modname)
  File "/opt/splunk/etc/apps/lookup_editor/appserver/modules/LookupFileEditor/LookupFileEditor.py", line 69
    except Exception, e :
                    ^
SyntaxError: invalid syntax
1 Solution

LukeMurphey
Champion

This issue is due to old modules being left on the file-system from a old version of the Lookup Editor app. Splunk allows remnants of old versions of apps to be left behind and these can cause issues upon upgrading. Specifically, SplunkWeb in 8.0.0 requires code to be Python 3 compatible and some of the old remnants are not Python 3 compatible.

To fix this, you just need to remove these old remnants. To do so, just remove the directory $SPLUNK_HOME/etc/apps/lookup_editor/appserver/modules/ and restart Splunk.

View solution in original post

dwraesner
Path Finder

Hello,

Just a heads up that the same app, Lookup Editor 3.3.3, also caused SplunkWeb to not start for Splunk Enterprise 7.2.6 even though the Compatibility section shows SE 7.2 included as of 3-12-20.

For the Splunk folks, this caused many headaches as there was nothing in either the splunkd.log or the web_services.log indicating this was the issue. After adding, state=disabled, in the local app.conf file for the Lookup Editor app, and restarting then SplunkWeb started with no issue.

Compatibility
Products: Splunk Cloud, Splunk Enterprise
Splunk Versions: 8.0, 7.3, 7.2, 7.1, 7.0, 6.6
Platform: Platform Independent

https://splunkbase.splunk.com/app/1724/

0 Karma

LukeMurphey
Champion

This issue is due to old modules being left on the file-system from a old version of the Lookup Editor app. Splunk allows remnants of old versions of apps to be left behind and these can cause issues upon upgrading. Specifically, SplunkWeb in 8.0.0 requires code to be Python 3 compatible and some of the old remnants are not Python 3 compatible.

To fix this, you just need to remove these old remnants. To do so, just remove the directory $SPLUNK_HOME/etc/apps/lookup_editor/appserver/modules/ and restart Splunk.

DBattisto
Communicator

Great answer. I had a similar issue with the Splunk_App_for_nix.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...