Hi,
Good morning.
Your help is needed:
I am relatively new to Django. After developing a Django app, I am trying
to write my first patch for Django.
I checked out Django from github: VERSION = (1, 7, 0, 'alpha', 0).
When I run the unit tests with the command "python runtests.py", I get 6
errors and 2 failures.
But in the Django Jenkins server, the builds are successful.
The error is: OSError: [WinError 10013] An attempt was made to access a
socket in a way forbidden by its access permissions
I tried the following:
1) Ran a command prompt as administrator.
2) Added python.exe to firewall inbound rules.
3) There are some suggestions for this error in stack overflow:
http://stackoverflow.com/questions/2778840/socket-error-errno-10013-an-attempt-was-made-to-access-a-socket-in-a-way-forb
http://stackoverflow.com/questions/16908529/python-3-x-socket-error-errno-10013-an-attempt-was-made-to-access-a-socket-in
The first suggestion seem require code changes in Django, and the second
suggestion seem require code changes in Python http/server.py.
But these suggestions do not seem right to me.
I am running a Windows 7 Enterprise OS (version 6.1) with Python 3.3.2
32-bit version.
Is this a supported config to build Django?
Have any of you faced this error?
I appreciate any help that you can provide to solve the errors and failures.
Please find the error and failure tracebacks in the text file attached
herewith.
Thanks,
Antony
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/8f23755c-be2b-4a24-a00e-aaaead7f78ab%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
======================================================================
ERROR: setUpClass (staticfiles_tests.test_liveserver.StaticLiveServerView)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\tests\staticfiles_tests\test_liveserver.py", li
ne 35, in setUpClass
super(LiveServerBase, cls).setUpClass()
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1138, in setUpC
lass
raise cls.server_thread.error
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1039, in run
(self.host, port), QuietWSGIRequestHandler)
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 109, in
__init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Python33\lib\socketserver.py", line 430, in __init__
self.server_bind()
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 113, in
server_bind
super(WSGIServer, self).server_bind()
File "C:\Python33\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Python33\lib\http\server.py", line 135, in server_bind
socketserver.TCPServer.server_bind(self)
File "C:\Python33\lib\socketserver.py", line 441, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbid
den by its access permissions
======================================================================
ERROR: setUpClass (admin_scripts.tests.StartProject)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1138, in setUpC
lass
raise cls.server_thread.error
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1039, in run
(self.host, port), QuietWSGIRequestHandler)
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 109, in
__init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Python33\lib\socketserver.py", line 430, in __init__
self.server_bind()
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 113, in
server_bind
super(WSGIServer, self).server_bind()
File "C:\Python33\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Python33\lib\http\server.py", line 135, in server_bind
socketserver.TCPServer.server_bind(self)
File "C:\Python33\lib\socketserver.py", line 441, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbid
den by its access permissions
======================================================================
ERROR: setUpClass (file_storage.tests.FileLikeObjectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1138, in setUpC
lass
raise cls.server_thread.error
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1039, in run
(self.host, port), QuietWSGIRequestHandler)
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 109, in
__init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Python33\lib\socketserver.py", line 430, in __init__
self.server_bind()
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 113, in
server_bind
super(WSGIServer, self).server_bind()
File "C:\Python33\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Python33\lib\http\server.py", line 135, in server_bind
socketserver.TCPServer.server_bind(self)
File "C:\Python33\lib\socketserver.py", line 441, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbid
den by its access permissions
======================================================================
ERROR: test_files_content (migrations.test_commands.MakeMigrationsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\tests\migrations\test_commands.py", line 147, i
n test_files_content
content = force_text(fp.read())
File "C:\Python33\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 484: char
acter maps to <undefined>
======================================================================
ERROR: setUpClass (servers.tests.LiveServerDatabase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\tests\servers\tests.py", line 46, in setUpClass
super(LiveServerBase, cls).setUpClass()
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1138, in setUpC
lass
raise cls.server_thread.error
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1039, in run
(self.host, port), QuietWSGIRequestHandler)
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 109, in
__init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Python33\lib\socketserver.py", line 430, in __init__
self.server_bind()
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 113, in
server_bind
super(WSGIServer, self).server_bind()
File "C:\Python33\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Python33\lib\http\server.py", line 135, in server_bind
socketserver.TCPServer.server_bind(self)
File "C:\Python33\lib\socketserver.py", line 441, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbid
den by its access permissions
======================================================================
ERROR: setUpClass (servers.tests.LiveServerViews)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\tests\servers\tests.py", line 46, in setUpClass
super(LiveServerBase, cls).setUpClass()
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1138, in setUpC
lass
raise cls.server_thread.error
File "c:\Code\DjangoDev\django\django\test\testcases.py", line 1039, in run
(self.host, port), QuietWSGIRequestHandler)
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 109, in
__init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Python33\lib\socketserver.py", line 430, in __init__
self.server_bind()
File "c:\Code\DjangoDev\django\django\core\servers\basehttp.py", line 113, in
server_bind
super(WSGIServer, self).server_bind()
File "C:\Python33\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Python33\lib\http\server.py", line 135, in server_bind
socketserver.TCPServer.server_bind(self)
File "C:\Python33\lib\socketserver.py", line 441, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbid
den by its access permissions
======================================================================
FAIL: test_app_command (admin_scripts.tests.CommandTypes)
User AppCommands can execute when a single app name is provided
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\tests\admin_scripts\tests.py", line 1401, in te
st_app_command
self.assertOutput(out, os.sep.join(['django', 'contrib', 'auth', 'models.py'
]))
File "c:\Code\DjangoDev\django\tests\admin_scripts\tests.py", line 187, in ass
ertOutput
self.assertTrue(msg in stream, "'%s' does not match actual output text '%s'"
% (msg, stream))
AssertionError: False is not true : 'django\contrib\auth\models.py' does not mat
ch actual output text 'EXECUTE:AppCommand app=<module 'django.contrib.auth.model
s' from 'c:\\Code\\DjangoDev\\django\\django\\contrib\\auth\\models.py'>, option
s=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback',
None), ('verbosity', '1')]
'
======================================================================
FAIL: test_app_command_multiple_apps (admin_scripts.tests.CommandTypes)
User AppCommands raise an error when multiple app names are provided
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Code\DjangoDev\django\tests\admin_scripts\tests.py", line 1416, in te
st_app_command_multiple_apps
self.assertOutput(out, os.sep.join(['django', 'contrib', 'auth', 'models.py'
]))
File "c:\Code\DjangoDev\django\tests\admin_scripts\tests.py", line 187, in ass
ertOutput
self.assertTrue(msg in stream, "'%s' does not match actual output text '%s'"
% (msg, stream))
AssertionError: False is not true : 'django\contrib\auth\models.py' does not mat
ch actual output text 'EXECUTE:AppCommand app=<module 'django.contrib.auth.model
s' from 'c:\\Code\\DjangoDev\\django\\django\\contrib\\auth\\models.py'>, option
s=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback',
None), ('verbosity', '1')]
EXECUTE:AppCommand app=<module 'django.contrib.contenttypes.models' from 'c:\\Co
de\\DjangoDev\\django\\django\\contrib\\contenttypes\\models.py'>, options=[('no
_color', False), ('pythonpath', None), ('settings', None), ('traceback', None),
('verbosity', '1')]
'
----------------------------------------------------------------------
Ran 6089 tests in 272.406s
FAILED (failures=2, errors=6, skipped=560, expected failures=7)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...