PYTHONANYWHERE ... i've started to get a "403 FORBIDDEN" error when trying to access /admin/default/ - pythonanywhere

thanks in advance for the help.
I need to access one of my apps admin area (I do this every day as I am constantly updating the code) but this morning I got the following error when trying to access "https://www.tenissocial.pt/admin/default" ..
"403 FORBIDDEN"
Any ideas? Many thanks, Pedro
. http://www.tenissocial.pt/ is working fine
. I've made no changes to the app or anywhere within the setup of my pythonanywhere services
. I've got other 2 apps/web services that are within the same pythonanywhere account still working fine. ie, I can access via https://.../default/admin/
. the app code is inside /web2py2 directory

I've managed to "solve" the issue by deleting the web app; creating a new one; recreating the app by using the backed-up package from a few days ago; adding missing data by hand; and changing the CNAME on my host....
A bit of a pain, but it worked.... I still don't know what caused the problem, but all is now good.
Thanks to all.
Kind regards,
Pedro

Related

RStudio/Git trouble pushing

Hello I am running RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for macOS and I can not push to GitHUb.
I have tried to change from HTTPS to SSH but nothing worked so far, I have all the identifications but I do not how to solve it, please could you please help me. I am lost
I want to push projects to GitHub, I have tried many times change from HTTPS to SSH and a new key , also I have verify the connection to ssh and everything seems to work.
Any help is really appreciated.
One option is to stick with HTTPS URL, and use:
credentials::set_github_pat("my_pat")
(Use your Personal Access Token)
That should be enough to allow you to push from RStudio.

Google Vision API - tatusCode.RESOURCE_EXHAUSTED

I am new to the Google Vision API and I would like to conduct a label detection of approx. 10 images and I would like to run the vision quickstart.py file. However when I do this with only 3 images then it is successful. With more than 3 images I am getting the error message below. I know that I would need to change something at my setup, but I do not know what I should change.
Here is my error message:
google.gax.errors.RetryError: GaxError(Exception occurred in retry method
that was not classified as transient, caused by <_Rendezvous of RPC that
terminated with (StatusCode.RESOURCE_EXHAUSTED, Insufficient tokens for
quota 'DefaultGroup' and limit 'USER-100s' of service
'vision.googleapis.com' for consumer 'project_number: XXX'.)>)
Does anybody know what I need to do?
Any help would be much appreciated
Cheers,
Andi
I ran into the same problem and fixed it with these steps:
Make sure you have the Google Cloud SDK properly installed: https://cloud.google.com/vision/docs/reference/libraries
Setup a Service Account in the Google Cloud backend: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
Create a Service Account Key and download it as a JSON file to a local folder. You need to keep the key private.
Export the filepath to the key-file as an environment variable: gcloud auth activate-service-account --key-file path/to/your/keyfile/here
Log out/in of the console.
Make sure, the environment variable is properly set with printenv
Try your py-script again...
Good luck...
Edit: In addition to the mentioned steps 1.-3. you can just do vision_client = vision.Client.from_service_account_json('/path/to/your/keyfile.json') in your script. No need for the env variable then.

Mulesoft - Uh-oh spaghettios! There's nothing here

This error is driving me nuts...
Situation:
I am trying to create a REST api and use a api-gateway proxy to access it. Proxy URL is HTTPS.
The deployment goes through fine. No errors reported in the logs. Worker assigned.
However when I try to access through browser get the "Uh-oh spaghettios! There's nothing here.".
Have tried all the usual things like making the https port dynamic using ${https.port} and using 0.0.0.0 instead of localhost in the http-listener config. But that does not help. Has this something to got to do with the proxy version ?
Any help or pointers will be great!
Make sure you follow Steps 2 from below link
Getting Started with Connectors
All,
Got the resolution. The problem was with the certificate chain. The keystore did not contain intermediate certificates. When added to the keystore the connectivity worked fine.
Only if Mulesoft provided correct errors or detailed logging, I would have saved lot of time over this.
Thanks for your inputs.

Magento: Add New Product Form not displaying in Admin

I've just installed the magento and when I tried to add new product from admin,But now product form is not being displaying. I can see the page like this
what should I do? Please, I searched through Google, but, couldn't find any appropriate answer.
Have you already tried to clear cache and cookies? also some times you have to do it on the shell on /path/to/my/magento/folder/var/cache just run "rm -fr *".
If that doesn't work you can check you files ownership and permissions (the http service has to have the write write permissions an ownership on the files and folder - http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions).
Hope that works for you.
You could try enabling display_errors in index.php i.e.
ini_set('display_errors', 1);
Also you could enable logs in your backend, and check for errors in system.log and exception.log
As Magneto's back end makes heavy use of prototype.js, check your console for errors .

Rails4 Dalli ArgumentError key cannot be blank

just run into an odd ArgumentError key cannot be blank error for a shiny Rails4 app with session store config to use memcache store
I've created an app to demo
https://github.com/khoan/rails4_dalli_session_store_error_app
ideas on how to fix?
Thanks in advance.
We got this error too. Memcached is not down. It happen sometimes on production server and I managed to reproduce it on a pristine rails4 application using dalli_store or mem_cache_store as session_store. Sending a request with a forged blank session_id cookie will raise ArgumentError (key cannot be blank)
I had this issue as well. Dalli 2.7.2 fixes the issue(dalli#52f2208), so I recommend upgrading.
i got this error, too.
problem is memcached is down.(check application log)
check your memcached daemon!