Hello all,
Artiq dashboard crashes when I run my script:
`from artiq.experiment import *
import numpy as np
class ti_cooling_artiq_bugfix(EnvExperiment):
def build(self):
self.setattr_device("core") #artiq core CPU
self.setattr_device("ttl1") #ablation laser trigger
self.setattr_device("ttl0") #red pitaya trigger
self.setattr_device("urukul0_ch0") # AO drive
self.setattr_device("redpitaya0") # red pitaya
self.setattr_argument("aom_shift_frequencies_MHz", Scannable(global_max=int(40*MHz), global_min=int(-40*MHz), ndecimals=int(6*MHz),
default=[RangeScan(int(-20*MHz),int(20*MHz),int(40*MHz))]))
self.u0_ch0_freq_MHz = 80*MHz
self.u0_ch0_amp_V = 0.12*V
self.u0_ch0_att_dB = 0.0*dB
def prepare(self):
self.aom_shift_frequencies_MHz = np.array(list(self.aom_shift_frequencies_MHz))
@kernel
def run(self):
#init CPU (core)
self.core.reset()
#init ttl
self.ttl0.output()
self.ttl1.output()
#init urukul
self.urukul0_ch0.init()
self.core.break_realtime() #trying to fix RTIO runtime errors (underflow?)
delay(0.1*s)
#setting freqs, amps and attenuation
self.urukul0_ch0.set(self.u0_ch0_freq_MHz, amplitude = self.u0_ch0_amp_V)
self.urukul0_ch0.set_att(self.u0_ch0_att_dB)
self.core.break_realtime()
delay(0.1*s)
#initialize redpitaya
self.redpitaya0.initialize()
#turning urukul ch0 on
self.core.break_realtime()
self.urukul0_ch0.sw.on()
### taking scan
self.redpitaya0.record_next_N_traces(len(self.aom_shift_frequencies_MHz), 1000, decimation=64)
self.core.break_realtime()
delay(0.1*s)
for aom_shift in range(len(self.aom_shift_frequencies_MHz)):
self.ttl0.pulse(1*ms)
delay(0.1*s)
self.redpitaya0.show_traces(chb_on=False) #was: (cha_on=True, chb_on=False)
self.core.wait_until_mu(now_mu())
print("Appending to buffer...")
self.redpitaya0.append_traces_to_buffer()
print("Plotting.. .")
self.redpitaya0.show_avg_traces(chb_on=False)
self.redpitaya0.save_buffer_to_dataset(self)
print("Done.")`
So I comment out most everything other than the self, build functions. Essentially now everything is commented out other than the basic code in order to get the dashboard running. ARTIQ dashboard crashes whenever I try to open it from the dashboard explorer. I try to remove the "run" function, it still crashes the dashboard. I also tried clearing cache as well as killing any running python code that could be in background via terminal. In addition to the crashes, I get the following error that is on a loop:
INFO:controller(core_moninj):print:OSError: [Errno 98] error while attempting to bind on address ('::1', 1383, 0, 0): address already in use
ERROR:controller(core_log):asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-1' coro=<get_logs() running at /home/eurydice/miniconda3/envs/testbeam_v2.0/lib/python3.10/site-packages/artiq/frontend/aqctl_corelog.py:44> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_write_done(8, handle=<Handle BaseS...1.75', 1380))>)(), Task.task_wakeup()]>>
ERROR:controller(core_log):artiq.frontend.aqctl_corelog:Logging connection terminating with exception
Traceback (most recent call last):
File "/home/eurydice/miniconda3/envs/testbeam_v2.0/lib/python3.10/site-packages/artiq/frontend/aqctl_corelog.py", line 44, in get_logs
reader, writer = await async_open_connection(
GeneratorExit
ERROR:controller(core_log):asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-1' coro=<get_logs() running at /home/eurydice/miniconda3/envs/testbeam_v2.0/lib/python3.10/site-packages/artiq/frontend/aqctl_corelog.py:44> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_write_done(8, handle=<Handle BaseS...1.75', 1380))>)(), Task.task_wakeup()]>>
ERROR:controller(core_log):artiq.frontend.aqctl_corelog:Logging connection terminating with exception
Traceback (most recent call last):
File "/home/eurydice/miniconda3/envs/testbeam_v2.0/lib/python3.10/site-packages/artiq/frontend/aqctl_corelog.py", line 44, in get_logs
reader, writer = await async_open_connection(
GeneratorExit
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Controller core_moninj exited
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Restarting in 87.2 seconds
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Controller core_log exited
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Restarting in 87.2 seconds
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Controller core_moninj exited
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Restarting in 87.2 seconds
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Controller core_log exited
WARNING:ctlmgr(eurydice):artiq_comtools.ctlmgr:Restarting in 87.2 seconds
Before these new errors, no other experiment crashes the dashboard. I tried restarting the computer, and I have played around with retyping a new file that is apparently identical. But then this new file starting having the same problem.