# Unable to download phasemeter file

**URL:** <https://forum.liquidinstruments.com/t/unable-to-download-phasemeter-file/1014>\
**Category:** Moku:Pro\
**Created:** [August 14, 2024, 4:12pm UTC](https://forum.liquidinstruments.com/t/unable-to-download-phasemeter-file/1014 "2024-08-14T16:12:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonhardt](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/bonhardt/32/295_2.png) [@bonhardt](https://forum.liquidinstruments.com/u/bonhardt)\
**Post date:** [August 14, 2024, 4:12pm UTC](https://forum.liquidinstruments.com/t/unable-to-download-phasemeter-file/1014/1 "2024-08-14T16:12:52Z")

</div>

**Moku model:** Moku Pro  
**Operating system:** Ubuntu 22  
**Software version:** 587

I’m trying to log phase meter data and save it on my computer. Unfortunately, it doesn’t work.

Sample code is:

```auto
m = MultiInstrument('192.168.###', platform_id=4,force_connect=True)

# wg = m.set_instrument(1, ArbitraryWaveformGenerator)
wg = m.set_instrument(1, WaveformGenerator)
wg1 = m.set_instrument(2, WaveformGenerator)
osc = m.set_instrument(3, Oscilloscope)
ph = m.set_instrument(4, Phasemeter)
# wg1=m.set_instrument(2, ArbitraryWaveformGenerator)
# osc = m.set_instrument(2, Oscilloscope)
    

# connections2 = [dict(source="Input1", destination="Slot1InA"),
# dict(source="Slot1OutA", destination="Slot3InA"),
# dict(source="Slot1OutA", destination="Output1"),
# dict(source="Input2", destination="Slot2InA"),
# dict(source="Slot2OutA", destination="Slot3InB"),
# dict(source="Slot2OutA", destination="Output2")]

connections = [dict(source="Input1", destination="Slot1InA"),
                    dict(source="Slot1OutA", destination="Slot3InA"),
                    dict(source="Slot1OutA", destination="Output1"),
                    dict(source="Input2", destination="Slot2InA"),
                    dict(source="Slot2OutA", destination="Slot3InB"),
                    dict(source="Slot2OutA", destination="Output2"),
                    dict(source="Input3", destination="Slot4InA"),
                    dict(source="Input4", destination="Slot4InB"),
                    dict(source="Slot4OutA", destination="Output3"),
                    dict(source="Slot4OutB", destination="Output4")
                   
                    ]

    
#connection2 works.

print(m.set_connections(connections=connections))

# wg.generate_waveform(channel=1, sample_rate='Auto',
# lut_data=list(m_sequence_output[1]), frequency=80e6,
# amplitude=1)

wg.generate_waveform(channel=1,
                        type='Sine', frequency=80e6,
                        amplitude=1)
# wg.generate_waveform(channel=2, sample_rate='Auto',
# lut_data=list(sine), frequency=100e6,
# amplitude=1)
wg1.generate_waveform(channel=1,
                        type='Sine', frequency=85e6,
                        amplitude=1)
osc.set_timebase(-5e-8, 5e-8, strict=False) #this has to be set well to work.
data = osc.get_data(timeout=60, wait_reacquire=False, wait_complete=True)

data2=ph.get_data()
response=ph.start_logging(duration=60)
ph.start_logging(duration=60, comments='Sample_Script')

file_name=response['file_name']
local_path='/home/lab/Desktop/DI/Data/'
target='persist'
ph.download(target, file_name, local_path)

```

I keep getting [Errno 2] No such file or directory: …

yet the directory exists.

Do you know why I’m facing this?

---

<div class="post-metadata">

**Author:** ![hanklong](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/hanklong/32/288_2.png) [@hanklong](https://forum.liquidinstruments.com/u/hanklong)\
**Post date:** [August 14, 2024, 7:45pm UTC](https://forum.liquidinstruments.com/t/unable-to-download-phasemeter-file/1014/2 "2024-08-14T19:45:07Z")

</div>

Hi @bonhardt ,

First of all, you will need to add a 60 seconds sleep in your code before you download the file.

After that, it is necessary to have a specific file name when you download the file. For example, these two lines specified a file name with a `.li` extension.

```auto
temp_filename = FILE_PATH + "/high_res_data-" + time.strftime('%d-%m-%Y-%H_%M_%S')
i.download("ssd", file_name, temp_filename + ".li")

```

For more information, please refer to this [Knowledge Base](https://knowledge.liquidinstruments.com/data-acquisition-with-deep-memory-mode?).

Best regards,  
Hank
