Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  11 Mar 2025, Federico Rezzonico, Bug Report, python hist_get_events not returning events, but javascript does 
    Reply  11 Mar 2025, Ben Smith, Bug Report, python hist_get_events not returning events, but javascript does 
Message ID: 2948     Entry time: 11 Mar 2025     In reply to: 2947
Author: Ben Smith 
Topic: Bug Report 
Subject: python hist_get_events not returning events, but javascript does 
> Valid events are:
> Enter event name:
> 
> was printed out, which signified that no events were found. No errors were displayed.

I can't reproduce this. I made a brand new experiment, started mlogger/mhttpd/fetest, then ran the same program. I get:

```
$ python basic_hist_script.py
Valid events are:
* Run transitions
* test_slow/data
Enter event name: 
```

Are you sure you ran the python program after running mlogger and not before? Can you try again after restarting mlogger? And can you verify that your python is connecting to the correct experiment if you have multiple experiments defined?

I tested with python 3.12.8 and 3.13.1, and am on MacOS 14.5, but I can't imagine those differences matter.

The python interface is a trivial wrapper around the C++ function, so the only python-specific thing that would result in an empty list is extracting an integer from a ctypes reference. If that's broken in your version then I don't think any of the midas python code would be working.
ELOG V3.1.4-2e1708b5