Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data not saving in the output directory, even when enabled true in the json file. #23

Closed
navneetercse opened this issue Oct 4, 2021 · 1 comment

Comments

@navneetercse
Copy link
Contributor

navneetercse commented Oct 4, 2021

There is an issue with the output data (MINseed). I have tried with two linux machines and I was facing the same issue that the data was not being written in the output directory.
When backtracked the issue, I found following errors
File "/home/navneet/miniconda3/envs/rsudp/lib/python3.7/site-packages/rsudp/c_write.py", line 126, in write outfile = self.outdir + test TypeError: unsupported operand type(s) for +: 'bool' and 'str'

On further debugging I found that the outdir has been intialized to data_dir and data_dir has been initialized with a boolean value False. When the c_write.py is accessing these global variables initialized in init.py , it is getting the default value rather than the updated value and that is where the issue arises. I think most probably this a multithreading issue and these variables needs to be made thread safe.

To resolve this I manually initialized the variables to my output directory in the init.py file. Somewhat like this ->

output_dir = "/home/navneet/rsudp"
odir = output_dir
data_dir = os.path.join(odir, 'data')
scap_dir = os.path.join(odir, 'screenshots')

#output_dir = False
#data_dir = False
#scap_dir = False

and then it started saving the files. Please fix this bug, it is specifically for the linux machines running Linux 5.4.0-81-generic x86_64 kernel

@iannesbitt
Copy link
Collaborator

iannesbitt commented Oct 16, 2021

Hi @navneetercse, thanks for reporting this issue. This issue should be fixed in this commit. If you install from master after this merge, you should no longer experience this problem. Let me know if otherwise. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants