Go to definition is not working with docker and vagrant - python

I have a project running on a docker container and another running on a vagrant machine, when I try in to go to definition in that two projects, I receive this message ex: "No definition found for 'BaseUserManager'. ", for all plugins that I have installed on that machines I get the same message.
PS: Go to definition just work on my local workspace.
can you guys help me to solve this problem please?, I really like vscode and I don't wanna quit the editor because of this issue.

The source has to be local for the extensions to be able to read the files to analyze the source.

Related

Running a Docker Image on Local Folder

I need to use a docker image which has compiled versions of certain programs that are very hard to compile from scratch.
I need to run a program in that environment.
I installed docker and pulled the image.
But how do I run a program (A Python program that works in the docker environment) using the environment provided to me by docker, sending in the local folder as input and producing the output back to my local system.
So far all resources tutorials show me how to work inside docker and not the problem I want.
Thanks for our help.
You should look at bind mounts. Here’s the Docker documentation of those.
Essentially, that will mount a folder in the host as a folder in the container.

Workaround to select python SDK in Intellij 2018.2

I am having a problem that seems to a possible bug of Intellij 2018.X
I am running Intellij 2018.2 (but the same happens with 2018.1) and I am unable to add Python SDK. My OS is Ubuntu 18.04.1 LTS.
The problem is located in Project Structure screen. There when I click on Add New SDK > Python SDK, it does nothing but totally ignores me, neither the popup to choose the location is shown nor an error or warning.
Same happens in SDK selectors of Project Structure > Project > Project Settings and in Project Structure > SDKs.
It's not the same as Unable to add Python SDK because in that, the user has the popup to select the path.
Do you know any workaround for this?
Please enable SSH Remote Run and Remote Hosts Access plugins, restart IntelliJ and check the problem again.
Could you please try this again and then upload your log folder zipped to https://uploads.services.jetbrains.com/? After uploading please provide the name of the zip file so we can find it. How to locate log - https://intellij-support.jetbrains.com/hc/en-us/articles/207241085
This gets solved with a patch of Intellij, now my version is:
IntelliJ IDEA 2018.2.3 (Ultimate Edition)
Build #IU-182.4323.46

Flask-Babel won't translate text on AWS within a docker container, but does locally

I have a flask app that is using flask-babel to translate text. I have created a docker container for it all to run in. And i have verified multiple times that both are being run and built exactly the same way.
When i put the app on my local docker container (using a vagrant linux machine). The translations work fine. When i put it on AWS, the translations do not work, and they simply show the msgid text. So things like "website_title" etc. instead of the correct localized text.
This is really weird to me because everything is running EXACTLY the same and inside of docker containers, so there shouldn't be anything different about them.
If needed i can post some code snippets with sensitive stuff edited out, but i was more hoping for someone to point me in a general direction on why this might be happening or how to even debug it. As far as i can tell there are no errors being logged anywhere.
I found the problem.
Locally i am running it on a vagrant virtual machine on a windows computer. It looks like because windows is not a case sensitive file system, when the python gettext() function was looking for en_US, i was passing it en_us, which it found on windows. But on AWS, it did not because it was running linux which is case sensitive.

Jenkins Build Python Project

I need to set up a Jenkins server to build a python project. But I can't find any good tutorials online to do this, most of what I see uses pip, but our project simply works on
python.exe setup.py build
I've tried running it as a Windows Batch file setting it up through the configure options in Jenkins, where I enter the above line in the box provided, but the build fails.
When I try to run this I get a build error telling me there is no cmd file or program in my project's workspace. But it seems to me that cmd would be a program inherent to Jenkins itself in this case.
What's the best way to go about setting up Jenkins to build a python project using setup.py?
Really i used jenkins to test Java EE project and i don't khnow if it will be the same principle or not ,
so i downloaded the jenkins.war from the website and i deployed it on my jboss server and I reached it via an url on the browser : http://localhost:serverport/jenkins the i created a job and i select the server & jdk & maven & the location of my project in workspace then i make a run to build the project.
I am sorry if you find that my subject is far from your demand but I tried to give you a visibility onto my use.
I relaized I did something stupid and forgot that my coworker had set it up on a UNIX server, so I should have been using the shell instead of Windows Batch. Once I changed that and installed the python plugin, I got it to build fine.

Can't run coursebuilder in google app engine

It is really weird that after clicking run button, it does nothing and also no log and show a clock sign on the first column.
It works normally before. However, after I messed up my python environment, the google coursebuilder can't run web application. That's my guessing. When I run which python.it only shows:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
These let me feel like I have no way to solve it!Are there anyone who came across this problem before? Any ideas or suggestions?
Updated: I follow suggestions to use command line to run web application on GAE. It reminds me here:
Update: The error message shows that GAE can't get the allocated port and domain. The reason why it happens is that when I use command line to run the web application, I also open GAE GUI to run a web app with the same port number.
So the way to solve it is to close the GAE GUI and free the port. Or we also could designate another kind of port number with command line.(--port=XXXX and --admin_port=YYYY). Or take a look at the doc:
Again thanks for the help of Mihail R!
The OP had multiple issues with GAE setup which were resolved by simply reinstalling the GAE Launcher and making sure the app was first copied into Applications from the .dmg file, then ran from the Applications instead of from inside the .dmg file, and appropriate permissions were suppose to be given so that GAE Launcher created the symlinks it needed to work properly.
More instructions on proper GAE SDK installation can be found here: https://cloud.google.com/appengine/downloads after clicking on the needed SDK and then the OS the SDK will be installed on.

Categories