New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Dev server on Windows #265
Comments
Sockets work differently in Windows (unix sockets dont exist), I'll see if I can push a bug fix tonight. |
@kirklg that would be amazing, thank you (and glad it's not me being dumb!) The production server will be uWSGI on Ubuntu, but for Dev I have to work in Windows. |
Hi @geoffjukes, I'm glad hug is working out for you! We're very happy to have you as a user :) I'm very sorry that hug 2.0.0 broke Windows, I've pushed an emergency fix to resolve this issue, that essentially only creates the use.Socket class if unix is detected. Please let me know if this fix works for you it is pushed as release 2.0.2. I'm going to be thinking about ways to run the automated tests on Windows to keep issues like this from happening in the future. Thanks! ~Timothy |
@timothycrosley Amazing response, thanks! I still can't get it running. At first I had an issue because I used falcon-style middleware calls. I changed then to the @hug.request_middleware, and the error went away. but now it just terminates with "Process finished with exit code 0". My apologies, I am typing this on my phone via a remote desktop. |
@timothycrosley pretty sure this one is my fault. My whole dev environment just went wonky. |
@timothycrosley Its not my environment. I just rebuilt everything, and the server just exits. I reverted to 1.9.9 until I'm back at my desk and can debug properly. I know there were other changes in 2.0, and it could be one of those. |
@tcrosley, this sounds like the issue we saw when cython compiled @geoffjukes, you mind verifying that types.py was compiled with cython, if so you could try removing the .so file and try rerunning in 2.0. |
Hi @geoffjukes, the issue may simply be how your starting the server: can you try switching out:
for:
And report back? The server function creates the wsgi compatible server object, but by it'self it wont function. The serve command is what runs the development server forever locally. In the meantime windows testing is getting close! https://ci.appveyor.com/project/TimothyCrosley/hug/build/1.0.19/job/nt3vg2tkub68rran Thanks! ~Timothy Crosley |
@kirklg When my env went wonky, I started from scratch, and cython wasn't installed. I am running python 3.4.4 (if that is relevant). I updated to 2.0.2 just to test again, and it still fails to start. |
Silly me, cython is probably not being used here. Please disregard my previous comment. |
@geoffjukes in case you missed my previous comment since we posted at the same time >.< can you try switching out:
for:
? I think this may fix it |
@timothycrosley that's why you get paid the big bucks :) That fixed it, and I'm now on 2.0.2. Thank you for the quick update and the help. Just a heads up that I had to switch my middleware to the decorator style too, as the falcon-style wouldn't work for me. In case the docs need updating. Great project, Great response! Thanks guys. |
So glad we could help resolve your issue! For future reference you should be able to use Falcon style middlewares as long as you switch from Thanks! ~Timothy |
Hi,
I love this project by the way - it made my life so much simpler!
I just upgraded to 2.01 and now my Dev server won't start. I'm probably doing it all wrong anyway, so I hope someone will steer me right.
I have a small 'run.py' script that sits outside the API package I wrote, and it calls
__hug__.serve()
This worked on 1.9.9, but after upgrading to 2.0.1 it throws this error:
I tried switching to use
hug.API(api).http.server()
, and even a crudecall(["hug", "api"])
, all with the same error.Am I being dumb? or was there a change that broke Windows?
Thanks!
Geoff
The text was updated successfully, but these errors were encountered: