Why is my Read the Docs build failing? - python

I'm trying to make documentation with read the docs for a dummy package, to learn how to use RTD. I followed this tutorial and successfully made index.html and pushed my changes to git (though I'm using gitlab instead of github to host my code). However I cannot get it to be hosted on RTD.
I've connected RTD to my gitlab project via a webhook (and tested it on gitlab; it passed the test). I have both the gitlab project and the RTD project set to public. However I've tried building a version on RTD and it fails every time, without providing a warning/reason.
The first few times when I clicked on the RTD link for my project it said the page doesn't exist, now I get the following error:
Permission Denied
You don't have the proper permissions to view this page. Please contact the owner of this project to request permission.
Any ideas why this is happening or how to fix it?

try to open cmd as administrator and then:
idle pythonPath.py
or if you are using linux
sudo idle pythonPath.py

Related

How can I get the token-sheets.pickle and token-drive.pickle files to use ezsheets for Google Sheets?

I am trying to set up ezsheets for the use with Google Sheets. I followed the instructions from here https://ezsheets.readthedocs.io/en/latest/ and here https://automatetheboringstuff.com/2e/chapter14/
The set up process works quite differently on my computer: Somehow I could download the credentials-sheets.json. I need to download the token-sheets.pickle and token-drive.pickle files. When I run import ezsheets, no browser window is opended as described in the set up instructions. Nothing happens.
Is there another way to download both files?
I followed the steps you referenced and managed to generate the files, but I also encountered the same issue before figuring out the cause. The problem is that there are a few possible causes and the script silently fails without telling you exactly what happened.
Here are a few suggestions:
First off you need to configure your OAuth Consent Screen. You won't be able to create the credentials without it.
Make sure that you have the right credentials file. To generate it you have to go to the Credentials page in the Cloud Console. The docs say that you need an OAuth Client ID. Make sure that you have chosen the correct app at the top.
Then you will be prompted to choose an application type. According to the docs you shared the type should be "Other", but this is no longer available so "Desktop app" is the best equivalent if you're just running a local script.
After that you can just choose a name and create the credentials. You will be prompted to download the file afterwards.
Check that the credentials-sheets.json file has that exact name.
Make sure that the credentials-sheets.json file is located in the same directory where you're running your python script file or console commands.
Check that you've enabled both the Sheets and Drive API in your GCP Project.
Python will try to setup a temporary server on http://localhost:8080/ to retrieve the pickle files. If another application is using port 8080 then it will also fail. In my case a previously failed Python script was hanging on to that port.
To find and close the processes using port 8080 you can refer to this answer for Linux/Mac or this other answer for Windows. Just make sure that the process is not something you're currently using.
I just used the single import ezsheets command to get the files so after getting the token-sheets.pickle I had to run it again to get the token-drive.pickle, but after that the library should detect that you already have the files.

Can't find `FlaskWebProject` files in Azure set-up

I am trying to run through the creation of a Flask web app in Azure using this instruction page.
Creating Web apps with Flask in Azure
In the "Application Overveiw" section, it lists some FlaskWebProjectfiles saying.
Here's an overview of the files you'll find in the initial Git repository
\FlaskWebProject\__init__.py
\FlaskWebProject\views.py
\FlaskWebProject\static\content\
\FlaskWebProject\static\fonts\
\FlaskWebProject\static\scripts\
\FlaskWebProject\templates\about.html
\FlaskWebProject\templates\contact.html
\FlaskWebProject\templates\index.html
\FlaskWebProject\templates\layout.html
The problem is that I don't get these files when I connect up Azure to a Github repository. I know they exist because my Azure app renders the this default Flask webapp. The files exist in /wwwroot.
I am sure that I am missing something obvious here, so if anyone has followed the most recent Flask setup instruction for Azure, and had success, their input would be great.
Your initial GitHub repository is empty, so you need to clone the repository.
The process is described in the same article you mentioned, but a little later.
Basically:
1) Go to the deployment source and configure the deployment source - for example, local github
2) Go to Settings => Properties. Here you should have Git URL where your files are placed
3) Go to your workstation, and execute
git clone https://yourdeploymentusername#todeleteflask.scm.azurewebsites.net:443/todeleteflask.git
Enter password.
You should be all set now. Now, if you make change, you may push to the repository and it will arrive on the site.

Getting push to deploy to work, configuring "release pipeline"

So since last week suddenly git push origin master doesn't work anymore to "push to deploy". It sure pushes the sources to remote repository at Google, and the code is there but it never deploys. Read about it here: GAE: Trouble with push to deploy
It seems things are changing over at Google and this week there is new stuff in the Google Developer Console, in the "Cloud Development/Releases" section; "Configure Release Pipeline"
There are three settings: the pipeline name, pipeline tasks, and then an optional setting to have deploy notifications sent by email.
I just enter a random name like "mydevpipeline", select "Deploy source only", and check the email box. But I just get this error: "Failed to create the pipeline.". I also tried unchecking the email box, still same error. Tried it over and over.
No where to go from there...
Anyone been able to create this pipeline and get it all working?
It seems that this pipeline configuration must go through in order for push to deploy from now. I haven't seen any news or notification about this change...
Fwiw, the documentation https://developers.google.com/appengine/docs/push-to-deploy states nothing about pipelines. It's just outdated I guess.
Update:
What do you know... I went on trying to configure this pipeline on the live GAE project (the one described above is the dev GAE project I'm using)... and it worked. I could configure a pipeline ok. After that, I could once more push-to-deploy, alas only on the live version so far. I might try creating a new dev project, it seems existing projects "break" from time to time... I have had similar problems before and creating a new project DOES solve things from time to time.....
Google App Engine pipelines do not like .gitignore file. Try if it works without that file. It fixed the problem for me.
It took me a long time to get this working for PHP, after a lot of communication with Google it was finally revealed to me that in your app.yaml file you need to have a line that reads:
threadsafe: false
In order for the pipeline to successfully pick up and deploy your git push (I use sourcetree, but command line git has the same end result) that line must be present. If it's omitted or set to true the pipeline won't be able to deploy it.
I wanted to throw this answer on here in case anyone stumbled on this thread looking for help. One of my projects has "randomly broken" and after 3 months of successfully using my release pipeline for multiple commits per day it suddenly no longer deploys when I push. Ultimately giving the extremely helpful error message of "Unable to get deployment status" - and now none of my changes can be applied to the live site. Copying the entire source code, changing the app name, and pushing to a new GAE project with release pipeline works fine, but I need the original site to start working again.

deploying f-droid server

I am trying to deploy a simple binary repo in f-droid server as per the instructions in the manual.
Being a complete newbie to python, I couldn't figure out the process. Here is what I have done so far:
Installed Ubuntu via VirtualBox in my Mac.
downloaded android SDK and kept it in ~/tools/android-sdk. same goes with NDK.
cloned fdroidserver and fdroiddata repos and added the path of fdroidserver to $PATH.
copied fdroiddata to /var/www/ (not sure whether this is right)
Edited config.py to reflect SDK n NDK path, set repo URL as localhost/fdroiddata
created repo dir inside fdroiddata, copied an APK in it and tried running fdroid update.py (which throws errors)
I couldnt get the server running. My another doubt: Will it be possible to view some data in server via localhost or the server respond properly only to the request raised from the fdroid android client?
Could someone please guide me in right directions?
Thanks
I figured it out finally with the help of moderators on f-droid official forum :-)
Only fdroidserver tools are needed to generate the repo files and the command to update repo is fdroid update and not fdroid update.py. They fixed it in the manual now.
Wrote a tutorial in my blog on setting up a simple binary repo.
We've recently revamped the F-Droid docs so things should be easier to find and follow. The instructions for setting up your own repo are now here: https://f-droid.org/docs/Setup_an_F-Droid_App_Repo

Installing Django/Python on IIS6

We are currently installing the latest version of Django and Python on IIS6. We have followed the instructions on the following site:
http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer
We are receiving a 403 error when trying to access our Django application via the IIS server.
We have verified the python installation on IIS6 and it is working properly.
We have also verified the Django installation. Our application runs fine under the built-in Django server, but we are having difficulties getting it to run under IIS.
We presume we could be getting errors from "Linking Django to PyISAPIe" section of the instructions provided on the link above.
Thanks.
Did you create a separate Application Pool to run PyISAPI (i.e. not the DefaultAppPool)? If so, what user/group does the pool run under? It's possible that you need to assign that user the proper rights. For example, see this page:
http://support.asimo.nl/activekb/questions.php?questionid=6
UPDATE: Here's another link with more detailed steps to check that your user permissions are set correctly:
http://forum.dotnetpanel.com/forums/t/602.aspx

Categories

Resources