frdrck / Pomme

The github for Pomme.us
http://pomme.us
4 stars 0 forks source link

Local Enviroment Progress #7

Open frdrck opened 12 years ago

frdrck commented 12 years ago

I have the server running, and apache running the front end.

I am stuck on:

File "/Users/frederick/PommeEnv/git/pomme/user.py", line 21, in init self.admin = row[13] IndexError: tuple index out of range

The issue occurs when I enter a username

julescarbon commented 12 years ago

Redumped the database schema, which I had changed from that base file by doing like ALTER TABLE ADD COLUMN over and over.

Load in the raw version of this file (do all the DROP TABLE statements too):

https://github.com/frdrck/Pomme/blob/server/pomme/sql/pomme-schema.sql

frdrck commented 12 years ago

Thanks jules, i'll use that over steves fix. im still at the same place though after the fact.

chrome tells me: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP. when i try to login a random name.

firefox doesnt give an error but it doesnt let me login either.

if i go to pomme:32123/stats to see the stats page, i get a big terminal crash of the 32123:


Exception happened during processing of request from ('127.0.0.1', 51828) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 615, in do_GET self.stats() File "pomme_server.py", line 650, in stats pommeCount = self.server.pomme.combo_count()

AttributeError: PommeDatabase instance has no attribute 'combo_count'

i made a new database with the new schema, but still the same result

frdrck commented 12 years ago

http://localhost:32123/stats now works thanks to jules fix: http://tinyurl.com/ctbrgo3 unfortunately i still have the dreaded: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.

julescarbon commented 12 years ago

try http://moonlitscript.com/2012/01/13/chrome-local-dev/

On Mon, Apr 16, 2012 at 8:52 PM, frdrck < reply@reply.github.com

wrote:

http://localhost:32123/stats now works thanks to jules fix: http://tinyurl.com/ctbrgo3 unfortunately i still have the dreaded when i type in a name: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166154

julescarbon commented 12 years ago

idk why it would be pulling file urls tho

On Mon, Apr 16, 2012 at 9:44 PM, Jules Laplace jules@okfoc.us wrote:

try http://moonlitscript.com/2012/01/13/chrome-local-dev/

On Mon, Apr 16, 2012 at 8:52 PM, frdrck < reply@reply.github.com

wrote:

http://localhost:32123/stats now works thanks to jules fix: http://tinyurl.com/ctbrgo3 unfortunately i still have the dreaded when i type in a name: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166154

frdrck commented 12 years ago

tried that last night, doesnt work On Apr 16, 2012, at 9:44 PM, Jules LaPlace wrote:

try http://moonlitscript.com/2012/01/13/chrome-local-dev/

On Mon, Apr 16, 2012 at 8:52 PM, frdrck < reply@reply.github.com

wrote:

http://localhost:32123/stats now works thanks to jules fix: http://tinyurl.com/ctbrgo3 unfortunately i still have the dreaded when i type in a name: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166154


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166680

julescarbon commented 12 years ago

IDK Try changing all the urls from localhost to pomme.net or whatever we set it to in the /etc/hosts file You can see Apache You can see the Pomme server Pomme can talk to the database Apache and Pomme cannot talk to each other Maybe this has to do with running them on localhost, I never ran them from my local machine though They use a technique called CORS cross-origin resource sharing that lets you fetch assets from different servers than the one the page is served from Normally this is a security thing that the browser doesn't let you do It's incredibly annoying as there is no other way to whitelist things except "jsonp" which I didn't do because it seemed crazy for persistent "realtime" things (too much overhead on client side) One option is to serve pomme assets from the server itself umm

I added something to the server that might do this I haven't set up mysql on my own machine though so i can't be sure right now really annoying I'm sick and I think I have a fever so I am gonna go to sleep Good luck fred

On Mon, Apr 16, 2012 at 9:49 PM, frdrck < reply@reply.github.com

wrote:

tried that last night, doesnt work On Apr 16, 2012, at 9:44 PM, Jules LaPlace wrote:

try http://moonlitscript.com/2012/01/13/chrome-local-dev/

On Mon, Apr 16, 2012 at 8:52 PM, frdrck < reply@reply.github.com

wrote:

http://localhost:32123/stats now works thanks to jules fix: http://tinyurl.com/ctbrgo3 unfortunately i still have the dreaded when i type in a name: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166154


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166680


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166737

frdrck commented 12 years ago

thanks for everything, love u On Apr 16, 2012, at 10:46 PM, Jules LaPlace wrote:

IDK Try changing all the urls from localhost to pomme.net or whatever we set it to in the /etc/hosts file You can see Apache You can see the Pomme server Pomme can talk to the database Apache and Pomme cannot talk to each other Maybe this has to do with running them on localhost, I never ran them from my local machine though They use a technique called CORS cross-origin resource sharing that lets you fetch assets from different servers than the one the page is served from Normally this is a security thing that the browser doesn't let you do It's incredibly annoying as there is no other way to whitelist things except "jsonp" which I didn't do because it seemed crazy for persistent "realtime" things (too much overhead on client side) One option is to serve pomme assets from the server itself umm

I added something to the server that might do this I haven't set up mysql on my own machine though so i can't be sure right now really annoying I'm sick and I think I have a fever so I am gonna go to sleep Good luck fred

On Mon, Apr 16, 2012 at 9:49 PM, frdrck < reply@reply.github.com

wrote:

tried that last night, doesnt work On Apr 16, 2012, at 9:44 PM, Jules LaPlace wrote:

try http://moonlitscript.com/2012/01/13/chrome-local-dev/

On Mon, Apr 16, 2012 at 8:52 PM, frdrck < reply@reply.github.com

wrote:

http://localhost:32123/stats now works thanks to jules fix: http://tinyurl.com/ctbrgo3 unfortunately i still have the dreaded when i type in a name: XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166154


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166680


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5166737


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5167280

geluso commented 12 years ago

XMLHttpRequest cannot load localhost:32123/user/login. Cross origin requests are only supported for HTTP.

This error is caused by using "localhost" instead of "http://localhost." The http prefix matters. See if there is anywhere making a request that is not prepended with "http."

frdrck commented 12 years ago

Well i did a fetch to try to get myself on the same page as you fellas, and it in returned i got pushed back to this connect error. I believe thorne fixed this this error earlier, but now its back.

hm.

File "pomme_server.py", line 714, in database = db.db() File "/Users/frederick/PommeEnv/git/pomme/db.py", line 30, in init self.connect() File "/Users/frederick/PommeEnv/git/pomme/db.py", line 37, in connect db = config.MYSQL_DATABASE) File "/Users/frederick/PommeEnv/lib/python2.7/site-packages/jon/dbpool.py", line 83, in connect conn = _Connection(None, None, _args, _kwargs) File "/Users/frederick/PommeEnv/lib/python2.7/site-packages/jon/dbpool.py", line 126, in init self._inner = _InnerConnection(_args, _kwargs) File "/Users/frederick/PommeEnv/lib/python2.7/site-packages/jon/dbpool.py", line 160, in init self._connection = _dbmod.connect(_args, *_kwargs) File "build/bdist.macosx-10.7-intel/egg/MySQLdb/init.py", line 81, in Connect File "build/bdist.macosx-10.7-intel/egg/MySQLdb/connections.py", line 187, in init _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")

geluso commented 12 years ago

Check config.py to make sure that it is trying to connect to your local database. Have you restarted your machine lately? Check to make sure your MySQL database is actually running. If you've installed MySQL tools you should be able to verify it us running by looking under "MySQL" in System Preferences.

frdrck commented 12 years ago

thanks for the speedy reply steve, i think a restart of my machine is definitely in order and could very well be the fix.

On Apr 18, 2012, at 4:14 PM, Steve Geluso wrote:

Check config.py to make sure that it is trying to connect to your local database. Have you restarted your machine lately? Check to make sure your MySQL database is actually running. If you've installed MySQL tools you should be able to verify it us running by looking under "MySQL" in System Preferences.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5207643

frdrck commented 12 years ago

Progress!! i'm still stuck at login, but at least its trying to take my name.

path: /user/login /user/login {'username': '', 'password': None, 'userid': 0, 'name': 'fdsfdfsd', 'user': None} new user: fdsfdfsd created sessionid: 7453769f31538d50cff97b705c15919fe17e54e8

path: /game/list

Exception happened during processing of request from ('127.0.0.1', 49539) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 519, in do_POST user = self.server.localhoster_from_session(form['session'].value, self._client_address) AttributeError: ThreadedHTTPServer instance has no attribute 'localhoster_from_session'

geluso commented 12 years ago

line 519 should be:

user = self.server.pomme.user_from_session(form['session'].value, self._client_address)

not: user = self.server.localhoster_from_session(form['session'].value, self._client_address)

side effect of searching and replacing "pomme.us" with "localhost" :)

if you don't have any local changes that you need to keep, you can

$ git checkout pomme/pomme_server.py

to reset the file to the same state of the repo.

julescarbon commented 12 years ago

awesome guys!! fred you're really close!! don't give up you're almost there! :-D

On Wed, Apr 18, 2012 at 10:53 PM, Steve Geluso < reply@reply.github.com

wrote:

line 519 should be:

user = self.server.pomme.user_from_session(form['session'].value, self._client_address)

not: user = self.server.localhoster_from_session(form['session'].value, self._client_address)


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5213931

frdrck commented 12 years ago

ok fellas, ive been trying to work this current issue out on my own. it seems to be working serverwise, but im having an issue with rooms.

i login and it just bounces me back and forth between localhost and localhost/bigapple forever. the screen only says "loading" as is it keeps moving back and forth forever. could be an issue with filename pathing.. not sure.

how are you guys doing with it?

this is what the terminal says, if it helps any:

path: /game/list /game/list {'username': 'dfdsfsd', 'userid': 49691L, 'user': <user.User instance at 0x10dc7c3f8>} path: /game/join * /game/join error: game does not exist bigapple path: /game/list /game/list {'username': 'dfdsfsd', 'userid': 49691L, 'user': <user.User instance at 0x10dc7c3f8>} path: /game/join * /game/join error: game does not exist bigapple

and it just repeats.. forever.. ))<>(( On Apr 19, 2012, at 1:18 AM, Jules LaPlace wrote:

awesome guys!! fred you're really close!! don't give up you're almost there! :-D

On Wed, Apr 18, 2012 at 10:53 PM, Steve Geluso < reply@reply.github.com

wrote:

line 519 should be:

user = self.server.pomme.user_from_session(form['session'].value, self._client_address)

not: user = self.server.localhoster_from_session(form['session'].value, self._client_address)


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5213931


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5215092

julescarbon commented 12 years ago

the issue is your database isn't populated with any games the code presumes that the bigapple game already exists first sign in with a name like frederick, so that acct gets created

SELECT id FROM pomme_user WHERE username="frederick";

you'll get output like:

+----+ | id | +----+ | 69 | +----+

then fill in whatever id you got in this next SQL statement where you see the 69 and then execute it.

INSERT INTO pomme_game (name,path,goal,capacity,startdate,lastdate,userid,username,timer) VALUES ("The Big Apple","bigapple",10,100,0,0, 69 ,"frederick",20);

On Thu, Apr 19, 2012 at 4:50 PM, frdrck < reply@reply.github.com

wrote:

ok fellas, ive been trying to work this current issue out on my own. it seems to be working serverwise, but im having an issue with rooms.

i login and it just bounces me back and forth between localhost and localhost/bigapple forever. the screen only says "loading" as is it keeps moving back and forth forever. could be an issue with filename pathing.. not sure.

how are you guys doing with it?

this is what the terminal says, if it helps any:

path: /game/list /game/list {'username': 'dfdsfsd', 'userid': 49691L, 'user': <user.User instance at 0x10dc7c3f8>} path: /game/join * /game/join error: game does not exist bigapple path: /game/list /game/list {'username': 'dfdsfsd', 'userid': 49691L, 'user': <user.User instance at 0x10dc7c3f8>} path: /game/join * /game/join error: game does not exist bigapple

and it just repeats.. forever.. ))<>(( On Apr 19, 2012, at 1:18 AM, Jules LaPlace wrote:

awesome guys!! fred you're really close!! don't give up you're almost there! :-D

On Wed, Apr 18, 2012 at 10:53 PM, Steve Geluso < reply@reply.github.com

wrote:

line 519 should be:

user = self.server.pomme.user_from_session(form['session'].value, self._client_address)

not: user = self.server.localhoster_from_session(form['session'].value, self._client_address)


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5213931


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5215092


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5231777

frdrck commented 12 years ago

thanks jules, now the game is:

XHR finished loading: "http://localhost:32123/game/join". jquery-1.7.1.min.js:4XHR finished loading: "http://localhost:32123/game/join". jquery-1.7.1.min.js:4XHR finished loading: "http://localhost:32123/game/join". jquery-1.7.1.min.js:4XHR finished loading: "http://localhost:32123/game/join". jquery-1.7.1.min.js:4XHR finished loading: "http://localhost:32123/game/join". over and over again on /bigapple

terminal is saying:


path: /game/join

Exception happened during processing of request from ('127.0.0.1', 55755) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 539, in do_POST self.game_api(game, args) File "pomme_server.py", line 607, in game_api self.json( GAME_API.get(self.path)(args) ) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 336, in api_join resp = self.api_poll(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 369, in api_poll resp['players'] = self.report_players(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 277, in report_players self.players[args['username']] = Player(self, args) File "/Users/frederick/PommeEnv/git/pomme/player.py", line 6, in init self.lastseen = now()

NameError: global name 'now' is not defined

geluso commented 12 years ago

I had this problem too. I thought it was a problem with cookies, but it ended up happening when, as Jules said, there aren't any games in progress.

If there are less than 2 games in progress then the javascript will make users auto-join a room. I pushed code that adds an AUTOJOIN varaible in config.js that will prevent this behavior. If AUTOJOIN is set to false then users will stay in the lobby even when there are no games in progress.

geluso commented 12 years ago

The error you just ran into is an import error.

self.lastseen = now()

causes the error: global name 'now' is not defined

The error means the function hasn't been defined in the current file, or hasn't been imported correctly. If we look at the import statements at the beginning of the file we see

from util import now

I moved some functions that were used in different places to a new file, util.py. See if you have util.py and make sure it has a now function defined in it.

https://github.com/frdrck/Pomme/blob/dev/pomme/util.py

We can chat later on Skype to troubleshoot this some more.

geluso commented 12 years ago

The lobby works for me, but when I try to join a game I'm prompted to login again. Probably a problem with cookies. After I login again the screen stays stuck on "loading."

so my workflow looks like this

will troubleshoot further, later.

frdrck commented 12 years ago

ok thanks a bunch steve!

On Apr 19, 2012, at 6:13 PM, Steve Geluso wrote:

The error means the function hasn't been defined in the current file, or hasn't been imported correctly. If we look at the import statements at the beginning of the file we see

from util import now

I moved some functions that were used in different places to a new file, util.py. See if you have util.py and make sure it has a now function defined in it.

frdrck commented 12 years ago

ok i'm on the same step as you steve, with the same error. do you have any terminal errors?

julescarbon commented 12 years ago

yah fred is there anything in the console? server is fine? it should be setting the cookie if you're getting in through the lobby.

On Thu, Apr 19, 2012 at 9:31 PM, frdrck < reply@reply.github.com

wrote:

ok i'm on the same step as you steve, with the same error. do you have any terminal errors?


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5236269

frdrck commented 12 years ago

path: /game/join

Exception happened during processing of request from ('127.0.0.1', 64106) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 539, in do_POST self.game_api(game, args) File "pomme_server.py", line 607, in game_api self.json( GAME_API.get(self.path)(args) ) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 336, in api_join resp = self.api_poll(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 369, in api_poll resp['players'] = self.report_players(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 277, in report_players self.players[args['username']] = Player(self, args) File "/Users/frederick/PommeEnv/git/pomme/player.py", line 6, in init self.lastseen = now() NameError: global name 'now' is not defined

my user.py was in check with the one on the github. idk whats causing this.. it should all be there.

On Apr 19, 2012, at 9:54 PM, Jules LaPlace wrote:

yah fred is there anything in the console? server is fine? it should be setting the cookie if you're getting in through the lobby.

julescarbon commented 12 years ago

hey fred i just added it to player.py try it!

On Thu, Apr 19, 2012 at 9:59 PM, frdrck < reply@reply.github.com

wrote:

path: /game/join

Exception happened during processing of request from ('127.0.0.1', 64106) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 539, in do_POST self.game_api(game, args) File "pomme_server.py", line 607, in game_api self.json( GAME_API.get(self.path)(args) ) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 336, in api_join resp = self.api_poll(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 369, in api_poll resp['players'] = self.report_players(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 277, in report_players self.players[args['username']] = Player(self, args) File "/Users/frederick/PommeEnv/git/pomme/player.py", line 6, in init self.lastseen = now() NameError: global name 'now' is not defined

my user.py was in check with the one on the github. idk whats causing this.. it should all be there.

On Apr 19, 2012, at 9:54 PM, Jules LaPlace wrote:

yah fred is there anything in the console? server is fine? it should be setting the cookie if you're getting in through the lobby.


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5236513

frdrck commented 12 years ago

progress! but no cigar..

path: /game/join

Exception happened during processing of request from ('127.0.0.1', 49698) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 539, in do_POST self.game_api(game, args) File "pomme_server.py", line 607, in game_api self.json( GAME_API.get(self.path)(args) ) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 336, in api_join resp = self.api_poll(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 369, in api_poll resp['players'] = self.report_players(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 277, in report_players self.players[args['username']] = Player(self, args) File "/Users/frederick/PommeEnv/git/pomme/player.py", line 9, in init self.cards = game.player_deck.hand(HAND_SIZE) NameError: global name 'HAND_SIZE' is not defined

julescarbon commented 12 years ago

hey fred I just did another commit check it out

"player" is used to track instances of users within games

On Fri, Apr 20, 2012 at 12:45 AM, frdrck < reply@reply.github.com

wrote:

progress! but no cigar..

path: /game/join

Exception happened during processing of request from ('127.0.0.1', 49698) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "pomme_server.py", line 472, in init BaseHTTPRequestHandler.init(self, request, client_address, server) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in init self.handle() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 325, in handle_one_request method() File "pomme_server.py", line 539, in do_POST self.game_api(game, args) File "pomme_server.py", line 607, in game_api self.json( GAME_API.get(self.path)(args) ) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 336, in api_join resp = self.api_poll(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 369, in api_poll resp['players'] = self.report_players(args) File "/Users/frederick/PommeEnv/git/pomme/game.py", line 277, in report_players self.players[args['username']] = Player(self, args) File "/Users/frederick/PommeEnv/git/pomme/player.py", line 9, in init self.cards = game.player_deck.hand(HAND_SIZE) NameError: global name 'HAND_SIZE' is not defined


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5237821

frdrck commented 12 years ago

Traceback (most recent call last): File "pomme_server.py", line 19, in from game import Game File "/Users/frederick/PommeEnv/git/pomme/game.py", line 3, in from player import Player File "/Users/frederick/PommeEnv/git/pomme/player.py", line 2 +HAND_SIZE = 5 SyntaxError: can't assign to operator

frdrck commented 12 years ago

sorry for late reply, make sure you're adding changes to the dev branch and not the master

julescarbon commented 12 years ago

oh weird how did a plus sign get there idk take it out. let's put it in config l8r

On Fri, Apr 20, 2012 at 4:46 PM, frdrck < reply@reply.github.com

wrote:

sorry for late reply, make sure you're adding changes to the dev branch and not the master


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5252795

frdrck commented 12 years ago

oh that + sign was my mistake... oops..

i recently repulled the dev branch and im getting some javascript errors in lobby2.js (the httpdocs version)

line 100, $ is not defined (its from the howto div that pepper wrote.. its probably going to need to be rewritten anyway,)

after i commented that out, i got an error on line 228 saying soundManager is not defined

i thought 'well ok we dont really need sound' so i commented that out just to see.

but now im getting an error online 998-1003 saying: Uncaught ReferenceError: $ is not defined Main.init (anonymous function)

i figure at this point i should speak up and see what you guys think

On Apr 20, 2012, at 8:25 PM, Jules LaPlace wrote:

oh weird how did a plus sign get there idk take it out. let's put it in config l8r

On Fri, Apr 20, 2012 at 4:46 PM, frdrck < reply@reply.github.com

wrote:

sorry for late reply, make sure you're adding changes to the dev branch and not the master


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5252795


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5255684

julescarbon commented 12 years ago

that means you don't have jquery somehow put this at the top of the html file

On Fri, Apr 20, 2012 at 9:28 PM, frdrck < reply@reply.github.com

wrote:

oh that + sign was my mistake... oops..

i recently repulled the dev branch and im getting some javascript errors in lobby2.js (the httpdocs version)

line 100, $ is not defined (its from the howto div that pepper wrote.. its probably going to need to be rewritten anyway,)

after i commented that out, i got an error on line 228 saying soundManager is not defined

i thought 'well ok we dont really need sound' so i commented that out just to see.

but now im getting an error online 998-1003 saying: Uncaught ReferenceError: $ is not defined Main.init (anonymous function)

i figure at this point i should speak up and see what you guys think

On Apr 20, 2012, at 8:25 PM, Jules LaPlace wrote:

oh weird how did a plus sign get there idk take it out. let's put it in config l8r

On Fri, Apr 20, 2012 at 4:46 PM, frdrck < reply@reply.github.com

wrote:

sorry for late reply, make sure you're adding changes to the dev branch and not the master


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5252795


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5255684


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5256050

frdrck commented 12 years ago

ok thanks jules, but i still have Uncaught ReferenceError: soundManager is not defined

On Apr 21, 2012, at 11:32 AM, Jules LaPlace wrote:

that means you don't have jquery somehow put this at the top of the html file

On Fri, Apr 20, 2012 at 9:28 PM, frdrck < reply@reply.github.com

wrote:

oh that + sign was my mistake... oops..

i recently repulled the dev branch and im getting some javascript errors in lobby2.js (the httpdocs version)

line 100, $ is not defined (its from the howto div that pepper wrote.. its probably going to need to be rewritten anyway,)

after i commented that out, i got an error on line 228 saying soundManager is not defined

i thought 'well ok we dont really need sound' so i commented that out just to see.

but now im getting an error online 998-1003 saying: Uncaught ReferenceError: $ is not defined Main.init (anonymous function)

i figure at this point i should speak up and see what you guys think

On Apr 20, 2012, at 8:25 PM, Jules LaPlace wrote:

oh weird how did a plus sign get there idk take it out. let's put it in config l8r

On Fri, Apr 20, 2012 at 4:46 PM, frdrck < reply@reply.github.com

wrote:

sorry for late reply, make sure you're adding changes to the dev branch and not the master


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5252795


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5255684


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5256050


Reply to this email directly or view it on GitHub: https://github.com/frdrck/Pomme/issues/7#issuecomment-5261294

frdrck commented 12 years ago

ok i commented out soundmanager and i got the login screen. the lobby looks like this: http://i.imgur.com/tKRtd.png

its calling for images that arent in the dev pack but are on the server in the recent wins:

GET http://localhost/img/player/1279213983813-dumpfm-noisia-slimer-at-the-door.gif 404 (Not Found) jquery.min.js:

GET http://localhost/img/main/1279235222382-dumpfm-neue-slimer_walk.gif 404 (Not Found) jquery.min.js:

what do you guys think?

frdrck commented 12 years ago

i hope you guys had a good weekend, we're really close to getting this going!

geluso commented 12 years ago

I changed the lobby to only make combos from images that are within our dev environments.

frdrck commented 12 years ago

what does your lobby look like steve? do any rooms work?

frdrck commented 12 years ago

heres jule's room error fix again. it didnt work for me, but maybe you guys can try it:

SELECT id FROM pomme_user WHERE username="frederick"; you'll get output like:

+----+ | id | +----+ | 69 |

+----+ then fill in whatever id you got in this next SQL statement where you see the 69 and then execute it.

INSERT INTO pomme_game (name,path,goal,capacity,startdate,lastdate,userid,username,timer) VALUES ("The Big Apple","bigapple",10,100,0,0, 69 ,"frederick",20);

frdrck commented 12 years ago

i just noticed my terminal error msgs: /pomme/count {'username': '', 'userid': 0, 'user': None} * /game/poll error: game does not exist lobbychat * /game/poll error: game does not exist lobbychat path: /pomme/count /pomme/count {'username': '', 'userid': 0, 'user': None} *\ /game/poll error: game does not exist lobbychat

maybe we need to add more values to the db

thornebrandt commented 12 years ago

Hey guys, sorry I didn't know this thread existed until now. I'm having the same error, although my images started working on my latest pull. They're the creepiest combos I've ever seen, too.

Here's a link to a screenshot of my lobby and terminal.

http://imgur.com/fnPAl

geluso commented 12 years ago

My lobby does not show any games in session, which makes sense because no one else should be logged in to our servers. I am able to create a new game, join and play. I join the game by spawning a few incognito windows to use as other players.

I also get the "game does not exist lobbychat" error, but what is lobbychat supposed to be anyways? Did there used to be a chatroom in the lobby? I don't seem it on the actual pomme.us.

Everything seems to be working on my end.

frdrck commented 12 years ago

That is fantastic news steve, if you could maybe commit your current set up to the dev branch, i'll just do a fresh pull. I don't know how my environment got so screwy.

geluso commented 12 years ago

My changes are all committed. Try pulling a fresh copy from the repo.

thornebrandt commented 12 years ago

I made those changes to the .mysql structure that jules posted, added a room to the database and can now play in it. I was able to add new users just by opening up a new tab, (did not need incognito browsing): http://imgur.com/5yd09

frdrck commented 12 years ago

i repulled and the images are now showing but it still looks like http://i.imgur.com/1WXW0.png i also got the jquery bug again from earlier (fixed by adding the script to the html file), and i had to comment out soundManager in lobby2.js

frdrck commented 12 years ago

hope guys had a good week, we should talk soon about updating the server! i'll be around all day tomorrow if you want to skype

frdrck commented 12 years ago

Where did everyone go :(

frdrck commented 12 years ago

i have a js question.. whats the difference between the js folder in /httpdocs and the js folder in /pomme.. are they both important or is one redundant? i understand they contain different files but im having js issues with my local enviroment and i feel like this might have something to do with it..

geluso commented 12 years ago

The js under httpdocs is the one that is actually used. I'm not sure why there is the js under the pomme directory. If you make changes to the js under the pomme directory then you will not see any changes. Make sure you are making changes to the one under the httpdocs.