Runtimes in journal_event break plugins
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 182
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
**Please complete the following information:**
- Version: 6.0.2 but it's been present for a while
- Game Version: Live
- OS: Window 11 (any)
- OS Locale: English (any)
- If applicable: Browser N/A
**Describe the bug**
Code in EDMarketConnector.py:journal_event() is not in any try:except blocks. The result is if anything runtimes event processing stops which can break any plugins that depend on the journal event. I've had this happen in at least two circumstances. One where the ships.json wasn't up to date triggering a key error and now when someone had misconfigured their output directory.
**To Reproduce**
It's hard to give specific directtions. If you clear your output directory but enable ship loadout exports no plugin will receive any Loadout events because EDMC errors before that code.
**Expected behavior**
EDMC catches the runtime and still calls plug.notify_journal_entry().
**Additional context**
**Please Confirm the Following...**
[//]: # (Add any other context about the problem here.)
- [x ] I have checked the [Known Issues](https://github.com/EDCD/EDMarketConnector/issues/618) list to ensure this is not a duplicate
- [x ] I have checked the [Troubleshooting Guide](https://github.com/EDCD/EDMarketConnector/wiki/Troubleshooting) to check for known workarounds
**Logs**
```python
2026-01-18 19:36:27.866 UTC - INFO - 3:140008192031680:3 .EDMC-NeutronDancer.Router.route_manager.Router.swap_ship:77: ShipID 14 not found in shipyard
Exception in Tkinter callback
Traceback (most recent call last):
File "/app/lib/python3.13/site-packages/tkinter/__init__.py", line 2074, in __call__
return self.func(*args)
~~~~~~~~~^^^^^^^
File "/app/edmarketconnector/EDMarketConnector.py", line 1545, in journal_event
monitor.export_ship()
~~~~~~~~~~~~~~~~~~~^^
File "/app/edmarketconnector/monitor.py", line 2303, in export_ship
oldfiles = sorted(x for x in listdir(config.get_str('outdir')) if regexp.match(x))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: ''
```
Contributor guide
Assessment
This issue has not been assessed yet.