vtsuperdarn / davitpy

DEPRECATED The DaViT Python project
http://vtsuperdarn.github.com/davitpy/
GNU General Public License v3.0
37 stars 59 forks source link

Suddenly can't import davitpy - getting an "attempt to write a readonly database" error #328

Closed drmike2017 closed 6 years ago

drmike2017 commented 6 years ago

Hello Everyone,

I am fairly new to the davitpy world. I have been producing some fan plots based on SuperDARN data for the past few days. All was well until this afternoon when I began to get some strange errors. I have attached a screen shot. This is the result of trying to import only davitpy and nothing else. I commented out the rest of my code to eliminate possible culprits, such as typos and bad code somewhere. I did not alter my code very much today, so there is something else going on. Again, this error is just from trying to import davitpy. It worked just fine this morning and yesterday. Any help would be greatly appreciated.

Thanks.

112117 - readonly database

aburrell commented 6 years ago

It looks like your temp directory is set to be a location that you don’t have permission to write to from whatever location you’re running in here.

You can check this by running:

$ grep “DAVIT_TMPDIR” ~/DIRECTORY_TO_DAVITPY/davitpy/davitpy/davitpyrc

which should give something like:

DAVIT_TMPDIR : /Users/ab763/Programs/Data/SuperDARN/Downloads/

You can then check and see if you have write permission using ls -lh.

On 21 Nov 2017, at 15:34, drmike2017 notifications@github.com wrote:

Hello Everyone,

I am fairly new to the davitpy world. I have been producing some fan plots based on SuperDARN data for the past few days. All was well until this afternoon when I began to get some strange errors. I have attached a screen shot. This is the result of trying to import only davitpy and nothing else. I commented out the rest of my code to eliminate possible culprits, such as typos and bad code somewhere. I did not alter my code very much today, so there is something else going on. Again, this error is just from trying to import davitpy. It worked just fine this morning and yesterday. Any help would be greatly appreciated.

Thanks.

https://user-images.githubusercontent.com/33164719/33097953-56867416-ced1-11e7-8867-484d1dca4c2f.jpg — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vtsuperdarn/davitpy/issues/328, or mute the thread https://github.com/notifications/unsubscribe-auth/AGuC_sQfd6DoiqqMOVqScaPmz0XvnSugks5s40H5gaJpZM4QmhR4.

drmike2017 commented 6 years ago

Hello Angeline,

The temporary directory is listed as /tmp/sd. I am familiar with this particular directory because I when first tried to use davitpy, an error message told me that I did not have write permission to it. I did have that corrected on the same day. Up until yesterday afternoon, davitpy worked very well after I had write access to /tmp/sd. I have checked and I still have full read and write access to that particular directory.

The error messages that I had attached in my first post are much different than the one I got when I first tried to use davitpy. For some reason, davitpy just stopped working and threw up the error codes. I still am at a loss as to why since I don't think I did anything to cause them. I even commented out all code except for "import davitpy" and the error messages still persist.

Could there be another directory or file that would lock me out for some reason (full over over used?). I have only been using davitpy for a few days though.

Many thanks.

aburrell commented 6 years ago

The error messages look like davitpy is having trouble accessing the .radar.sqlite file within your temporary directory. Do you have rw permission for /tmp/sd/.radars.sqlite?

If that’s not it, then I’m at a loss.

On 22 Nov 2017, at 09:30, Michael Earl notifications@github.com wrote:

Hello Angeline,

The temporary directory is listed as /tmp/sd. I am familiar with this particular directory because I when first tried to use davitpy, an error message told me that I did not have write permission to it. I did have that corrected on the same day. Up until yesterday afternoon, davitpy worked very well after I had write access to /tmp/sd. I have checked and I still have full read and write access to that particular directory.

The error messages that I had attached in my first post are much different than the one I got when I first tried to use davitpy. For some reason, davitpy just stopped working and threw up the error codes. I still am at a loss as to why since I don't think I did anything to cause them. I even commented out all code except for "import davitpy" and the error messages still persist.

Could there be another directory or file that would lock me out for some reason (full over over used?). I have only been using davitpy for a few days though.

Many thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vtsuperdarn/davitpy/issues/328#issuecomment-346384754, or mute the thread https://github.com/notifications/unsubscribe-auth/AGuC_ndYxQLQNHuCt8snhm0eZrNbQpbpks5s5D4ngaJpZM4QmhR4.

drmike2017 commented 6 years ago

Hello again,

Upon closer inspection of the /tmp/sd directory, I found a hidden file called ".radars.sqlite". Although the /tmp/sd directory is open for me to read and write to, the ".radars.sqlite" file is not. I had someone give me permissions to the folder /tmp/sd a few days back. I don't know if this included this particular hidden file as well. Is it possible that the ".radars.sqlite" file was updated and given the default permissions, thereby locking me out when trying to import the davitpy module? This is the only possibility that I can think of for now.

I am currently using davitpy from a dedicated server just to practice using the tool. I have tried to install it on my local machine but there were just too many errors (even for Ubuntu 16.04 LTS). It was easier to use a copy that was already installed and working on the server. Maybe trying a local copy again would be better since I will have full access to all of the folders and files (even the hidden ones).

Thanks.

drmike2017 commented 6 years ago

Hello Angeline,

OK, I just saw your message when I sent mine. I have confirmed that I no longer have write access to the ".radars.sqlite" file. The file's permissions must refresh somehow, thus locking me out. I will keep you updated on the progress.

Thanks.

drmike2017 commented 6 years ago

Hello Angeline,

Alright, everything is fine now. I had to make a copy of the davitpyrc file and change the tmp directory path. Now that I am the sole owner and can read and write to the folder and hidden files, there should be no further problems with respect to read/write permissions.

Many thanks!