examples not running

84 views
Skip to first unread message

brandt...@gmail.com

unread,
Feb 27, 2014, 7:44:42 PM2/27/14
to wtfra...@googlegroups.com
I generated a project with examples and it puts the the yaml in "configs/default.yaml" however it looks like runtests.py is looking for config/default:


bdaniels-mini:testssss bdaniels$ ./runtests.py
WARNING:wtframework:Config file not specified. Using config/defaults.yaml
ERROR:wtframework:Error loading config file: default
ERROR:wtframework:An error occurred while loading config file: (u'Error reading config file default', IOError(2, 'No such file or directory'))
Traceback (most recent call last):
File "./runtests.py", line 20, in <module>
from wtframework.wtf.config import ConfigReader
File "/Library/Python/2.7/site-packages/wtframework/wtf/config.py", line 149, in <module>
WTF_CONFIG_READER = ConfigReader()
File "/Library/Python/2.7/site-packages/wtframework/wtf/config.py", line 69, in __init__
raise e
wtframework.wtf.config.ConfigFileReadError: (u'Error reading config file default', IOError(2, 'No such file or directory'))
bdaniels-mini:testssss bdaniels$ ./runtests.py
WARNING:wtframework:Config file not specified. Using config/defaults.yaml
ERROR:wtframework:Error loading config file: default
ERROR:wtframework:An error occurred while loading config file: (u'Error reading config file default', IOError(2, 'No such file or directory'))
Traceback (most recent call last):
File "./runtests.py", line 20, in <module>
from wtframework.wtf.config import ConfigReader
File "/Library/Python/2.7/site-packages/wtframework/wtf/config.py", line 149, in <module>
WTF_CONFIG_READER = ConfigReader()
File "/Library/Python/2.7/site-packages/wtframework/wtf/config.py", line 69, in __init__
raise e
wtframework.wtf.config.ConfigFileReadError: (u'Error reading config file default', IOError(2, 'No such file or directory'))

also, I tried setting up your suggested layout:

configs/
browsers/
grid-iphone.yaml
grid-ipad.yaml
env/
stage.yaml
dev.yaml
prod.yaml


In your documentation, in various places it suggests setting the WTF_ENV variable differently using either a comma, a semi-colon, or a colon as a separator:

ex:
export WTF_ENV=env/stage;browers/grid-iphone

none seem to work....

also how do you do that on the command line?

./runtests.py -c env/stage;browsers/grid-iphone ?????


David Lai

unread,
Feb 27, 2014, 8:46:48 PM2/27/14
to
The commands you're using should work.  What OS, python version are you using?  I've been doing most of the development on Mac OSX, Python 2.7, and FreeBSD 10.  

For the passing the config option, it should be 
./runtests.py --config=env/stage,browsers/grid-iphone

For the WTF_ENV var, you can use semi colon or commas, depending on your OS environment, some OS considers semi colons as line separators between commands, in that situation, use a comma.


brandt...@gmail.com

unread,
Feb 27, 2014, 11:49:46 PM2/27/14
to wtfra...@googlegroups.com
OS X 10.9.2, and Python 2.7

I'd rather use the command line option so that it can be ran by a CI server. I wasn't aware you needed an equal sign in the --config line, it wasn't documented.

brandt...@gmail.com

unread,
Feb 28, 2014, 12:10:46 AM2/28/14
to wtfra...@googlegroups.com
btw the error message is wrong it should say "Using configs/default.yaml"

tried this on a default project --withexamples:

$ ./runtests.py --config=default


WARNING:wtframework:Config file not specified. Using config/defaults.yaml

Setting config WTF_ENV to: default

David Lai

unread,
Feb 28, 2014, 2:03:37 AM2/28/14
to wtfra...@googlegroups.com
Actually I was wrong, doing '-c configfile' also works too.

Thanks for pointing out the error message issue, I'll correct the spelling error when I get into work tomorrow.

can you do me a favor, is it possible for you to zip up the directory structure that was generated when you ran the wtf_init script and send it to da...@wiredrive.com,  I'd like to see if there is something wrong with some of the scripts that were generated for you.  As far as I can tell, we have the same desktop setup, and it should work as is if nothing was modified.

brandt...@gmail.com

unread,
Feb 28, 2014, 12:28:53 PM2/28/14
to wtfra...@googlegroups.com
Look like it's looking in the wrong place for the config:

it's looking in:

/Users/bdaniels/Documents/Workspace/Python/configs/default.yaml

it should be:

/Users/bdaniels/Documents/Workspace/Python/IFH/configs/default.yaml

brandt...@gmail.com

unread,
Feb 28, 2014, 12:55:25 PM2/28/14
to wtfra...@googlegroups.com
I figured it out......apparently I had generated a test project in the root folder of my workspace by accident. I deleted all the folders, but apparently there was a hidden .wtf_root_folder that I missed and it was screwing everything up having two of these in the file heirarchy.

David Lai

unread,
Feb 28, 2014, 1:23:31 PM2/28/14
to wtfra...@googlegroups.com
Looks like there was an issue with runtests.py created a 2nd instance of the config reader, which was outputting some bogus logs along the side that made debugging even more confusing.  I've submitted a fix for it, which will be pulled into the next release of WTF.
Reply all
Reply to author
Forward
0 new messages