PyDev says Undefined variable from import: AF_INET - eclipse

As show below, the editor displays false errors about predefined socket module. Every underlined word refers to the same message: 'Undefined variable from import: xxxxx' and 'xxxxx Found at: _socket'.
How can I configure PyDev to avoid them?
Python version is 3.6.9, Eclipse version is 2021.09.

The socket module information is usually loaded in a spawned python process and its contents sent to Eclipse... Sometimes this doesn't work and the usual culprit is that to get this info, a socket connection is made and this doesn't work properly.
The following faq entry: https://www.pydev.org/faq.html#HowToFixCodeCompletion has more information. Please see if you can fix it with that info (if you can't, please provide any error you have in your error log).

Related

How to resolve Pymongo Runtime Error R6034 in Houdini

I'm working at a visual effects studio in which we use MongoDB/pymongo for our asset management. Our studio is using the SideFX software Houdini.
So far MongoDB has been a pleasure to work with in terms of programming, however whenever we connect to the MongoDB via pymongo from within Houdini, we're getting the following error:
Microsoft Visual C++ Runtime Library - Runtime Error!
Program: C:\houdini\17.5.293\bin\houdini.exe
R6034
An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.
This error occurs everytime when we import pymongo for the very first time, i.e. in a Python shell within Houdini, which is using Python 2.7. Once we click 'OK' on the error popup (it appears twice after clicking OK for the first time), the error disappears and we're able to connect successfully to the database.
The SideFX support team suggested that pymongo wasn't compiled with Visual Studio 2017, which is the compiler SideFX is using for their software.
Now we've been trying to debug this for a while now to no avail. Here's a rundown of what we tried:
update Windows10 to the latest and greatest
updating pymongo from 3.5.1 to 3.9.0
launching Houdini from different builds (16.5, 17.0, 17.5), we get the error in every version.(We're launching a vanilla Houdini session without any 'PYTHONPATH' or 'PATH' environment variables set)
interestingly enough my colleague imported pymongo into Houdini successfully on his private laptop last night without any errors occurring which leads me to believe that the error might be related to our system settings possibly?
I would love to find out how to get rid of this error message because it is really messing with our current pipeline. Any suggestions/help is welcome and much appreciated.
Please let me know if you need any additional information in order to debug this matter.
Thanks a lot in advance,
Manu
This post here helped me to resolve my issue:
Runtime error R6034 in embedded Python application
What happened is that we have a Python 2.7 install located at C:\Python27 which is being added as an environment variable 'path' in Windows.
Using the Process Explorer, I learned that this folder contains the file 'msvcr90.dll' which is conflicting with Houdini, since Houdini comes with its own Python installation that doesn't contain this dll file.
The solution is simple. When launching Houdini in a custom environment, strip the C:\Python27 from the 'path' environment variable so Houdini only fires up its own Python interpreter.

eclipse pydev debug source lookup

So I have anaconda installed and make a separate environment for all my projects. Normally I just use PYDEV to create a new interpreter pointing to the anaconda enviornment and load the project in eclipse and all is good. After doing the last one though 95% of the time I go to debug I keep getting the error
An internal error occurred during: "Debug Source Lookup".
java.lang.IllegalArgumentException
The other 5% it kind of works as I can follow one script or a function before it starts breaking.
I've tried reloading the project, interpreter and conda enviornment to no luck. All my past projects which use to work are also now giving the same error.
The funny thing is when I'm in the debug perspective though it does seem to be working (I can see the Variables and use the interactive console to test stuff), but anytime I try to step into, over ect I get the error (even though it does seem to be working). So for the image above I can go through the code fine until it tries to jump to the other file which throws the error, but if I step into it I can manually open that file and walk through the function (just each step throws the error) and still interact with the code which is in the position through the console.
Any ideas how to fix?
Well, it may be something specific to this use-case (for instance, if the code for some object is evaluated and the source code is not really available for the debugger this is actually expected).
Can you provide the full stacktrace from the error log? (see: http://www.pydev.org/faq.html#HowdoIReportaBUG for details on how to get it)

Error in NS2 debugging using Eclipse: "Cant find a source file at... "

I am trying to debug NS-2.34 using Eclipse Luna 4.4.2 under Ubuntu 13.10, and I had successfully configured NS2 and Eclipse for debugging by following the instructions from here "https://erl1.wordpress.com/2012/01/11/using-ns-2-with-eclipse/." The problem is, when I start debugging, debugging will not continue due to the error
Can't find a source file at "/build/buildd/eglibc-2/17/elf/dl-debug.c"
Locate the file or edit the source lookup path to include its location
I tried to locate the file in my system but I can't seem to figure that part out. How can I solve this error?
I think that's one of the many reasons why a lot of people transfer from NS2 to NS3 when they find that the module they would like to use is available in NS3.
For your problem, the page you are referring to has been a long time ago and there might be conflicts caused by new version.
For me, as a ns2er, when I modified some code or add new files, I just do "make" command and see what I got in the terminal. It works in most of the time.
Cheers,
Zeyu

An error has occured. Please see log file - eclipse

When I start up Eclipse, it gives me an error saying:
An error has occurred. See the log file
/home/Vendetta/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1428564435095.log
on Linux Debian
Can you tell me what I should do?
Well whenever I've run into similar problems, it usually meant that a plug in had become out of synch with my eclipse file directory.
Unfortunately I can't give you much more than a generic "make sure your workspace is safe and re-download eclipse" with the information you've given.

JVM terminates with exit code 14 when trying to launch Eclipse

I've just connected to a machine I never worked on, and tried to run Eclipse there. Unfortunately, I got the error:
Eclipse:
JVM terminated. Exit code=14
(my configuration details here)
I guess there's either a problem with my configuration or with that machine's setup, but Exit code=14 does not give me a lot of information to go on. What does that mean? Where should I start?
I intentionally omitted my configuration details because I'm looking for a general explanation of that exit code, not a specific fix for my configuration.
It could be related to bug 9027: Workbench should check JDK version on startup
You could have an incompatible (ie too old) JVM: the code 14 has been referenced in this comment as:
The main launcher detects the JVM terminates with exit code 14. Is the
following message sufficient?
Please use a newer VM. Eclipse requires at least 1.3.1.
It can also be related with an incompatibility between what is installed on the system and what Eclipse needs when launching: see for instance this example.
Just to add to #VonC's answer, the Eclipse source code has this to say:
// Check to see if we are running with a compatible VM.
// If not, then return exit code "14" which will be recognized
// by the executable and an appropriate message will be displayed
// to the user.
if (!isCompatible())
System.exit(14);
(Source: http://svn.netlabs.org/repos/swt/trunk/src/plugins/org.eclipse.platform/src/org/eclipse/core/launcher/Main.java)
So I suggest checking whether you have a compatible JVM.