Import PPD file #8
|
Hi Thomas, I have used pyphotometry to collect some data in the form of ppd.file. However I am having some problem in opening the file for analysis. I tried to use the code you provided but I keep encountering error like this: I am still quite new to these so I am not sure what is the problem as I followed your guide on https://pyphotometry.readthedocs.io/en/latest/user-guide/importing-data/, I hope you can help me. Could you advise me on how to open the file? Thank you for your assistance and advice. Warm regards |
Replies: 1 comment
|
Hi Hana, This error is happening because the import os
os.getcwd() # Get the current working directory.
os.chdir('path//to//code//folder') # Set the current working directory.You should then be able to import the best, Thomas |

Hi Hana,
This error is happening because the
data_importmodule is not located anywhere where Python is looking for it, so Python is failing to import it. See here for more information about where the python interpreter looks for modules. The simplest way to fix this is to create acodefolder for your project where you will locate the python files that you use for that project's analysis. Then copy the filedata_import.pyfrompyPhotometry/toolsfolder into the code folder. When you open a python interpreter, you will then need to set the current working directory to the code folder you created. If you use an IDE like Spyder you can do this using the folder browser in the GUI. Alternativ…