How to add 'HttpLibrary' from RobotFramework to Red.xml on Eclipse - python-3.x

I trying to write test scripts using HttpLibrary (from robot framework) on Eclipse RED editor and below are the steps i have performed -
Steps performed
Installed robot framework HttpLibrary using below command
pip install --upgrade robotframework-httplibrary
From Settings-> Imports, added HttpLibrary to my script
* Settings *
Library HttpLibrary
'Unknown 'HttpLibrary' library. Try to use Quick Fix (Ctrl+1) or add library to red.xml for proper validation' error message is noticed on hovering the HttpLibrary line in my script.
However upon looking at Red.xml ->Referenced libraries tab, HttpLibrary is listed in the libraries block HttpLibrary in Red.xml
I am wondering if there is any different procedure to add libraries to Red.xml. I am stuck on trying different ways to add HttpLibrary to my script.

After few hours of investigation, i have found root cause of the issue.
I am using Python 3.6.4 in my machine and installed Robot Framework on it.
HttpLibrary supports only Python 2 and so though the library is listed in the Red.xml referenced libraries tab, still my Robot Framework script was not able to reference and run it properly.
Please note that not all the Robot Framework libraries are supported by Python 3.6.4

This occasionally happens. Even when the library is already present in the project config file (RED.xml) and present in the project tree panel. Using CTR+1 and opting for the quick fix option will generally correct this issue without any visual difference.
In the HttpLibrary Github documentation there the usage section also highlights that the library should be imported like:
*** Settings***
Library HttpLibrary.HTTP
This gives a different result.

Related

How do I configure a Python3 interpreter in IntelliJ IDEA

IntelliJ IDEA 16 when you create a virtualenv, you can call it as an SDK and automatically runs and validates language, libraries and everything that you need for that project. This is helpful since the lint and other libraries become available on the IDE.
The Problem:
I have a machine that has 2 python installations (python2 and python3).
I can set up virtual environments in those different versions but when I want to create a project SDK from a virtualenv where python 3 is being use get the message "Cannot Save Settings" "Please specify different sdk name".
The same process that I use to set up the virutalenv on python 2 is the same for python 3 but this error keeps happening.
I would appreciate any help on how to configure that. I have looked all around the web and forums that talk about intelliJ and the SDK configurations but all of them are for python 2.7 and not when you have two python version installed on the same machine and using virutalenvs so set it up.

Depending on lots of npm from vscode moduleā€¦?

I'm just starting out trying to integrate Ensime scala ide-support into vscode. I have pulled out some of the integration parts from my atom package https://github.com/ensime/ensime-atom into https://github.com/ensime/ensime-node.
However, when depending on this from vscode I get red squigglies that it can't be found:
However, code still build and runs just fine. I got worried. I found this:
Q: Can I use native Node.js modules with my extension?
A: A Visual Studio Code extension package contains all of its
dependencies. This means that if you develop your extension on Windows
and depend on a native Node.js module when you publish that extension,
the Windows compiled native dependency will be contained in your
extension. Users on OS X or Linux won't be able to use the extension.
The only way to make this work for now is to include binaries for all
four platforms of VS Code (Windows x86 and x64, Linux, OS X) in your
extension and have code that dynamically loads the right one.
What does this mean? I can't use fs, net, child_process and the like? Kindof need them all I think or does vscode provide all that through abstraction layers?
You do have the basic node modules (fs, etc) already included as part of the dependency of vscode itself.
Did you remember to include this module in your package.json file as a dependency?
A way to check this would be to clean your code, put it in a new folder, and run "npm install" - if everything then runs fine, you are good to go.
See this docs:
https://code.visualstudio.com/Docs/extensionAPI/extension-manifest
Be sure to also read up on the new extension authoring update in the latest version: https://code.visualstudio.com/Updates

Set up cocos2d-x-3.6 with eclipse on linux

I installed cocos2d-x-v3.6 and want to use it with an kubuntu repository version of eclipse (v3.8).
Although I added the path to cocos to the project's 'Path and Libraries > Includes' settings, I get a lot of errors of the sort:
Method '...' could not be resolved.
Function '...' could not be resolved.
Type '...' could not be resolved.
This is already true for the example code, see pictures.
This seems to be the case for mostly functions/variables in cocos namespaces, because basic classes, like 'Scene' are recognized.
What do I have to change in my settings so that also the members for this third-party framework are recognized?
Got it.
I started from scratch, installing cocos and all dependencies following these instructions - including android setup. (Before that, I followed the linux instructions and tried eclipse on that.)
I then used the cocos command line tool to build a new app skeleton, as described here.
Afterwards, I imported the proj.android subfolder into eclipse as an android project, as is described here for the cpp-tests example project shipped with cocos2d-x. (Importing libcocos2dx seemed not to be necessary at this point.)
All symbols, functions, methods where resolved by eclipse.
I had a look at the C++ Path and Libraries > Includes settings and there was a lot going on, many cocos subfolder are referenced.
However, autocompletion was still not working. I checked all checkboxes in the preferences at C++ or Java > Editor > Content Assist > Advanced and this did the trick, see screenshots.

Require and module statements not recognized in PyCharm

I do most of my work in python but we also have a node.js project that I work on so I was pleased to find that PyCharm supported the Node.js plugin.
After I installed it I was still having significant troubles getting a lot of the core node.js libraries and statements to be recognized by PyCharm. Most notably, PyCharm doesn't recognize the require or module statements.
Any ideas on what I could do to fix this?
Found the answer! In the Javascript tab of your project settings open the Library subtab. In there make sure you have the Node.js Core Modules and Node.js Globals checked as shown here.

How do I determine which eclipse sdk is being used?

I have multiple eclipse SDKs installed on my linux notebook. They are in different directories and I do not remember which is the last one I installed. The command 'which eclipse' gets me /usr/bin/eclipse. /usr/bin/eclipse is a shell script that (among other things) sets ECLIPSE=/usr/lib/eclipse/eclipse. /usr/lib/eclipse/eclipse is a real executable (not a link) that was copied in from elsewhere.
The command 'eclipse' brings up a functioning eclipse. My question is: If I want to expand the capabilities of this eclipse, which SDK do I need to make changes to - ie which SDK do I insert add-ons? That is, given an executing eclipse, how do I find the sdk?
On the Help > About Eclipse dialog click Installation Details for lots of details about the installation. The Configuration tab contains the paths of what is being used.
Adding to Eclipse is generally done using Help > Install New Software and you don't normally need to know where the Eclipse install is for this!

Resources