Error when running tests with nose-gae - python

I've been using nose-gae for awhile, and I just updated to release 0.3.0, which is only 3 days old. I'm running GAE SDK 1.9.17 on Mac OS X Yosemite.
When I run my tests, I get the following error:
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
can't open file
'/Library/Frameworks/Python.framework/Versions/2.7/bin/_python_runtime.py':
[Errno 2] No such file or directory
Sure enough, that file doesn't exist. My tests appear to run successfully however (test output below). I don't see any such errors when running the dev_appserver.
I don't know what _python_runtime.py is and what is causing the error. Any help figuring out what is going on would be appreciated.
====
$ nosetests -x tests/functional_tests.py
................/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Library/Frameworks/Python.framework/Versions/2.7/bin/_python_runtime.py': [Errno 2] No such file or directory
...
----------------------------------------------------------------------
Ran 19 tests in 11.032s
OK

This module _python_runtime.py should be in the SDK root folder. (confirmation here https://code.google.com/p/googleappengine/source/browse/trunk/python/)
Are you sure that it is included in your PATH? If yes -- it is best to fill an issue here, such nose-gae still buggy after update.
UPDATE this issue is solved with latest NoseGAE update, which is currently in dev branch here. Just clone it and use sudo python setup.py install to update it.

I think the problem is that nose-gae uses the old devappserver rather than the newer one. The old devappserver was removed from the SDK in 1.9.17.

Related

Trying to run a Brownie Dapp in Docker

I'm trying to run my brownie dapp in a docker container, but i always have the same error and can't seem to fix it:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/username/.brownie/packages/OpenZeppelin/openzeppelin-> > contracts#4.4.2/contracts/access/Ownable.sol'
I cloned the OpenZepplin folder with all the contracts to the work folder of my project and then remapped it like this:
dependencies:
- OpenZeppelin/openzeppelin-contracts#4.4.2
compiler:
solc:
remappings:
- "OpenZeppelin/openzeppelin-contracts#4.4.2/ = ./OpenZeppelin/openzeppelin-contracts#4.4.2/"
But it still gives the same error, and when I compile the contract, it is clearly still using the C:/Users/username/.brownie/packages/OpenZeppelin/openzeppelin-contracts#4.4.2/contracts folder. I know this because I tried to compile the contracts with a remapping to a non-existing folder:
remappings:
- "OpenZeppelin/openzeppelin-contracts#4.4.2/ = ./nothing/"
and it still compiled perfectly.
Just wondering if anybody could help me with this, and thank you in advance!
Ok, I just had the IDENTICAL issue as yourself. (I cloned a project and tried to run tests on my local machine, but got the same FileNotFoundError:)
But I managed to solve it.
First thing you need to have is Brownie itself (Obviously).
Second thing is installed OpenZeppelin packages inside Brownie.
Here is a link on how to set that up: #OpenZeppelin for Brownie
But in short, you just need this command:
brownie pm install OpenZeppelin/openzeppelin-contracts#4.4.2
MAKE SURE IT'S THE VERSION OF #OpenZeppelin YOU NEED !!
3.Final step is to go into your project's build/contracts directory and delete ALL smartContract.json files and then do brownie compile anew.
After that you can run test etc, it should work.
IN DEPT EXPLANATION:
The reason we were getting that error was because Brownie uses smartCotnract.json build files to run the tests, and to locate all of its own dependencies/packages. Those .json files also contain paths to all of it (including #OpenZeppelin package), and are generated during compile phase only if they don't already exist or the code had been edited in a specific contract. (That is why you need to delete them if you want for brownie compile to generate new ones)
Therefor if I compile it on my local machine and push those smartContract.json files to git, and you happen to clone all of it and run the compile/tests. It is highly unlikely it will work, as name-path on my local machine will differ. (Username is practically 100% bound to be different)

Xcode swift iOS project gives "usr/bin/python no such file or directory" error when try to build project

I am experiencing the problem after the macOS 12.3 Monterey update. I get the following error when I want to run the project. There is a code looking for "/usr/bin/python" in the project, but I couldn't find which part of code/framework/script etc. is looking for that path in my project. There is no problem in the path "usr/local/bin/python", but my project gives the error that I cannot find the path to "usr/bin/python". When I looked there, "/usr/bin/python3" exist. Unfortunately, since it is the system folder, I cannot make any changes(add or remove files or links) in that folder.
First you need to install python2. This can be done according to the guide
Then it is necessary in the file
{PATH_TO_PROJECT}/scripts/licenses/importLicensePods.py
replace the first line with #!/usr/bin/python to #!/usr/bin/local/python

Error Installing Libffm: 'No such file or directory.'

I am presently trying to install the Python wrapper of libffm stored in this Git repository. I cloned both the repositories as was suggested by the quick-start guide, but ran into the following error when running the 'make' command in terminal.
'fatal error: parallel/winpthreadsll.h: No such file or directory'
I attached a screenshot below for convenience. The funny thing is that when I check in the specified directory, 'winpthreadsll.h' does indeed exist. Thoughts on why this error occurs? Thanks!
Screenshot of Error
You reported it in issue 10, but that was already reported in issue 5.
See "gcc/g++: “No such file or directory”", and see if you can indicate to the compiler where the parent folder of parallel/winpthreadsll.h is.

Open Edx IOError: [Errno 20] (draggabilly.pkgd.js)

I installed OpenEdx with Vagrant,
When I try to launch paver devstack studio or paver devstack lms with --fast or not, I got one error:
IOError: [Errno 20] Not a directory: '/edx/app/edxapp/edx-platform/common/lib/xm
odule/xmodule/js/common_static/js/vendor/draggabilly.pkgd.js'
I try a lot of tricks I could see on StackOverflow, but nothing work.
(I tried the "dealing-with-line-endings-and-symlinks-under-windows" trick)
This is my cygwin logs when I try : http://pastebin.com/ZcJqZU06
Thanks
I have seen this error many times and I can tell you it is definitely a symlink error.
Sadly I could never find a reliable solution so what I do now while working with openedx under windows is that I remove the shared folder where the edx-platform is installed.
Search for and comment this lines in your Vagrantfile:
config.vm.synced_folder "#{edx_platform_mount_dir}", "/edx/app/edxapp/edx-platform",
create: true, owner: "edxapp", group: "www-data"
config.vm.synced_folder "#{edx_platform_mount_dir}", "/edx/app/edxapp/edx-platform",
create: true, nfs: true
This will allow you to run the platform under windows, but since you are not sharing the directory where the code is, then it a lot more complicated to edit and change to your will. For that I recommend switching to an OS that does a better job with symlinks.
copy file in folder edx/app/edxapp/edx-platform/common/static
then create folder name common_static in edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/js
paste file in folder common_static
Hope this can solve your problem

Error running .py from Windows 7 command prompt

I am new to python and I have just installed python 2.7.3 on Windows. I will also install django so I need to execute a file named ez_setup.py. I know it seems like an easy question and answer can be found in internet, but this is not the case. I tried lots of things and tried what internet says, the problem is still there and I cant find the problem!
I follow all the steps that is explained in tutorials in order for Python to work properly. (Installing steps and editing environment variables..)
Python's location is:
C:\Users\name\27
Command prompt starts like:
C:\Users\name>
I have put ez_setup.py file under both C:\Users\name\27 and C:\Users\name.
When I type "ez_setup.py" or "python ez_setup.py" or "\27 python ez_setup.py" and lot of combination, it says:
python: cant open file 'ez_setup.py': [Errno 2] No such file or directory.
What should I do? Where do I make mistake?
Just do:
python ez_setup.py
You need to say your machine that it should execute this .py file with python.

Categories