Problems Solutions -- 9 No Socket could be created

2023-12-27 15:08

本文主要是介绍Problems Solutions -- 9 No Socket could be created,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这几天重新学习 Learn Python The Hard Way , 花了5~6 天时间,前前后后又学了一遍,收获很多。


遇到了这个错误:

(learn_web) for-python@ubuntu:~/mystuff/projects/gothonweb$ python2 bin/app.py
http://0.0.0.0:8080/
Traceback (most recent call last):File "bin/app.py", line 15, in <module>app.run()File "/home/for-python/.local/lib/python2.7/site-packages/web/application.py", line 310, in runreturn wsgi.runwsgi(self.wsgifunc(*middleware))File "/home/for-python/.local/lib/python2.7/site-packages/web/wsgi.py", line 54, in runwsgireturn httpserver.runsimple(func, validip(listget(sys.argv, 1, '')))File "/home/for-python/.local/lib/python2.7/site-packages/web/httpserver.py", line 148, in runsimpleserver.start()File "/home/for-python/.local/lib/python2.7/site-packages/web/wsgiserver/__init__.py", line 1753, in startraise socket.error(msg)
socket.error: No socket could be created

真的,主要还是这些名词不熟悉,端口被占用了。
重换一个端口,python2 bin/app.py 8001就好了:
(虚拟环境中默认使用python3,这里指定使用python2)

(learn_web) for-python@ubuntu:~/mystuff/projects/gothonweb$ python2 bin/app.py 8001
http://0.0.0.0:8001/

这篇关于Problems Solutions -- 9 No Socket could be created的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/543540

相关文章

揭秘Python Socket网络编程的7种硬核用法

《揭秘PythonSocket网络编程的7种硬核用法》Socket不仅能做聊天室,还能干一大堆硬核操作,这篇文章就带大家看看Python网络编程的7种超实用玩法,感兴趣的小伙伴可以跟随小编一起... 目录1.端口扫描器:探测开放端口2.简易 HTTP 服务器:10 秒搭个网页3.局域网游戏:多人联机对战4.

Caused by: org.hibernate.MappingException: Could not determine type for: org.cgh.ssh.pojo.GoodsType,

MappingException:这个主要是类映射上的异常,Could not determine type for: org.cgh.ssh.pojo.GoodsType,这句话表示GoodsType这个类没有被映射到

Debugging Lua Project created in Cocos Code IDE creates “Waiting for debugger to connect” in Win-7

转自 I Installed Cocos Code IDE and created a new Lua Project. When Debugging the Project(F11) the game window pops up and gives me the message waiting for debugger to connect and then freezes. Also a

nyoj 695 Judging Filling Problems

一道强大的模拟题。。。 只要学会<string>类的运用即可。。。 注意: 1、细节的处理。 2、问题的分情况讨论。。 附上代码: 有好对缀余的地方,希望大神前来更新。 #include<stdio.h>#include<string.h>#include<string>#include<iostream>using namespace std;int num[1000

Java Socket服务器端与客户端的编程步骤总结

一,InetAddress类: InetAddress类没有构造方法,所以不能直接new出一个对象; 可以通过InetAddress类的静态方法获得InetAddress的对象; InetAddress.getLocalHost(); InetAddress.getByName(""); 类主要方法: String - address.getHostName(); String - addre

VC环境下window网络程序:UDP Socket程序

最近在学Windows网络编程,正好在做UDPsocket的程序,贴上来: 服务器框架函数:              socket();    bind();    recfrom();  sendto();  closesocket(); 客户机框架函数:            socket();      recfrom();  sendto();  closesocket();

Hibernate插入数据时,报错:org.springframework.dao.DataIntegrityViolationException: could not insert: [cn.itc

在用junit测试:插入数据时,报一下错误: 错误原因: package junit;import org.junit.Test;import cn.itcast.crm.container.ServiceProvinder;import cn.itcast.crm.dao.ISysUserDao;import cn.itcast.crm.domain.SysRole;

created生命周期函数获取不到vuex数据解决方法

问题:在created中获取vuex数据,然后去后端请求数据,发现获取的vuex数据不存在。 解决方法:使用watch监听vuex数据,当数据发生变化在去后端请求数据

mybatis错误——java.io.IOException Could not find resource comxxxxxxMapper.xml

在学习Mybatis的时候,参考网上的教程进行简单demo的搭建,配置的没有问题,然后出现了下面的错误! Exception in thread "main" java.lang.RuntimeException: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause:

Docker容器创建时,无法访问镜像源:Could not connect to archive.ubuntu.com:80

1.问题描述 当基于dockerfile创建容器时,遇到Could not connect to ...、Failed to fetch ...等异常时,大概原因是没有配置好容器创建所需的镜像源。这里以Ubuntu基础镜像源为例。 dockerfile内容 FROM ubuntuRUN apt update && apt install python3 -y && apt install