Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #11419
| From | Alexandros Afentoulis <alexaf@bloom.re> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: AttributeError: module 'socket' has no attribute 'timeout' |
| Date | 2019-04-25 10:20 +0200 |
| Message-ID | <xQHLP-3OM-1@gated-at.bofh.it> (permalink) |
| References | <xQGZr-3fY-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 4/25/19 10:04 AM, Artem Golubev wrote: > Hello, I’m using python3.5, python3.7 on Debian 9 stretch > This is my code: [snip] > > When I execute my code I receive this error > > *************** > Traceback (most recent call last): > File "/root/python/projects/test/socket.py", line 7, in <module> > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > AttributeError: module 'socket' has no attribute 'AF_INET' > Hi, the problem is you've named your file 'socket', and that precedes the python module 'socket' when importing. Try renaming it. Since your question is not specific to debian python packaging though, it would be probably better to ask elsewhere, e.g. https://stackoverflow.com/ Cheers
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
AttributeError: module 'socket' has no attribute 'timeout' Artem Golubev <agolubev.n@gmail.com> - 2019-04-25 09:30 +0200 Re: AttributeError: module 'socket' has no attribute 'timeout' Alexandros Afentoulis <alexaf@bloom.re> - 2019-04-25 10:20 +0200 Re: AttributeError: module 'socket' has no attribute 'timeout' Neil Williams <codehelp@debian.org> - 2019-04-25 10:20 +0200
csiph-web