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
CurlAccess not creating temp files correctly on Windows #11
Comments
@mstalbot can you please look at this issue? |
I think it's an issue with Windows truncating the file extensions when writing certain file types, which then messes up the path definitions/locations for the code to recognize. When I try
I get a text file called How did this work for you, @mstalbot? I'm running Windows 7. Is there a setting I have turned off or on that's causing this? |
it is likely that the .txt and .err are simply hidden, not removed. googled this: |
I used Windows 10 (64 bit) to run the code for the test.txt example above and can see the .txt extension present in the output file in both 'File Explorer' (i.e. like Finder) and in python. Python only opens the test file if the .txt extension is included in the load. Can you successfully load the test file without stating the extension (hidden or not) into python? This bug is interesting since the curl example above worked for me once #12 was fixed (thus I assumed #11 was fixed as well...sorry about that). I'm looking more into the issue and may be able to test this on a Windows 7 machine. I'll keep you updated. |
I suspect I may have found the problem. The error you encountered can be reproduced on Windows 10 by intentionally miss-typing the 'curl' in the command string in curl.stream.streamlet and running the Popen command. Preserving 'curl ' in the command and intentionally messing up another part of the command string does not return the error you encountered. Windows 7 is 11+ years old, and does not have Curl pre-installed (in fact, Microsoft is dis-continuing updates for Windows 7 this January). A bit of googling revealed that most or all Windows before Windows 10 do not have Curl pre-installed. Brian: Can you type 'curl --help' in the command prompt and verify if Curl is installed? |
If cURL is not installed on your system, no worries since cURL should be free to download. This site ('https://develop.zendesk.com/hc/en-us/articles/360001068567-Installing-and-using-cURL#install') gives detailed instructions on how to install cURL onto windows 7 and points you to the necessary download+certificate links from the cURL website. The site also has better info on when cURL was installed by default onto Windows 10 as per version 1803 or later. If your system is 64 bit, you have the option to update to Windows 10 for free. Here is a video tutorial that instruct how to do this from the Microsoft web site: 'https://www.youtube.com/watch?v=9iUX7sQeOkg'. |
Thanks @joelbrownstein, @mstalbot. Very interesting stuff. It's quite possible I don't have curl on my machine. My desktop is quite old at this point. I still might have issues with the hidden file extensions, since I can recreate my problem simply with writing a test file. I'll be able to test all of your suggestions tonight and play around with it. If it turns out to be particulars of my machine that I can overcome, then I think we should add these points into the documentation for using |
Your welcome. I tested the idea Joel suggested and noticed that selecting the ''Hide extensions for known file types' will hide all but the .err extensions in my 'File Explorer', while all extensions are still visible in the command prompt. |
Looks like we're converging on the bugfix by checking that cURL is installed. In addition to documenting this as Brian suggests, I think we should add the equivalent of |
Agreed. |
sdss_access/master now has a curl check and abort if not installed. |
Well it was a curl issue. I didn't have it installed. You can also install it if you Anaconda with |
Also, this is verbosity that I get when I run
At first glance, it looks like it succeeds. I have to go into the |
Interesting since your error indicates that curl wants to create the E folder. I did not have that problem when I tested curl when setting home on the D drive vs C. I'll think on it. Also, here is a potential edit for the 'return code' printout in stream.py (in run_streamlets):
with
and remove the "SDSS_ACCESS> Done!" printout command in cly.py. |
I like your suggestion. I've incorporated a version of it. Since |
Sounds great! Thanks! |
This can now be closed |
I'm trying to test that this works so I can integrate the PR into Marvin. It currently fails for me testing on my Windows 7 machine. I think the issue here is that the temporary files aren't being created correctly.
To reproduce
The following error occurs. The same error occurs when using
Access
instead ofCurlAccess
.Here is my
curl.stream.task
.and my
curl.stream.streamlet
My
cli.data_dir
andcli.tmp_dir
are set correctly.If I look at the streamlet path location,
C:\\Users\\Brian\\AppData\\Local\\Temp\\sdss_access\\20191117_002\\sdss _access_00'
, I see the following fileswhich I think are supposed to be the
.txt
and.log
files, but they don't look like they are creating correctly.The text was updated successfully, but these errors were encountered: