OpenRA / OpenRA-Resources

The OpenRA Resource Center helps the community sharing their custom maps.
http://resource.openra.net
Other
21 stars 18 forks source link

DataError at /upload/map/value too long for type character varying(200) #219

Closed VagueVigor closed 10 years ago

VagueVigor commented 10 years ago

Tried to upload my new map: http://www.speedyshare.com/Z5JcX

But i get error:


DataError at /upload/map/

value too long for type character varying(200)

Request Method:     POST
Request URL:    http://resource.openra.net/upload/map/
Django Version:     1.6.2
Exception Type:     DataError
Exception Value:    

value too long for type character varying(200)

Exception Location:     /usr/local/lib/python2.7/dist-packages/django/db/backends/util.py in execute, line 53
Python Executable:  /usr/bin/python
Python Version:     2.7.6
Python Path:    

['/home/ihptru/www/resource',
 '/usr/bin',
 '/usr/local/lib/python2.7/dist-packages/django_registration-1.0-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/South-0.8.4-py2.7.egg',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/local/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/pymodules/python2.7']

Server time:    Sun, 13 Jul 2014 14:32:41 +0000
Traceback Switch to copy-and-paste view

    /usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response

                            response = wrapped_callback(request, *callback_args, **callback_kwargs)

        ...
    ▶ Local vars
    /home/ihptru/www/resource/openraData/views.py in uploadMap

                    uploadingMap.ProcessUploading(user_id, request.FILES['file'], request.POST, rev, previous_rev)

        ...
    ▶ Local vars
    /home/ihptru/www/resource/openraData/handlers.py in ProcessUploading

                transac.save()

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/base.py in save

                               force_update=force_update, update_fields=update_fields)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/base.py in save_base

                    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/base.py in _save_table

                    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/base.py in _do_insert

                                       using=using, raw=raw)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/manager.py in _insert

                return insert_query(self.model, objs, fields, **kwargs)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/query.py in insert_query

            return query.get_compiler(using=using).execute_sql(return_id)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py in execute_sql

                    cursor.execute(sql, params)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/backends/util.py in execute

                    return super(CursorDebugWrapper, self).execute(sql, params)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/backends/util.py in execute

                        return self.cursor.execute(sql, params)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/utils.py in __exit__

                        six.reraise(dj_exc_type, dj_exc_value, traceback)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/db/backends/util.py in execute

                        return self.cursor.execute(sql, params)

        ...
    ▶ Local vars

Request information
GET

No GET data
POST
Variable    Value
info    

u''

csrfmiddlewaretoken     

u'JYQ7Tq7DPk0umTuw2q8cOBeLQOI0EGet'

commercial  

u'com_no'

adaptations     

u'adapt_alike'

policy_cc   

u'cc_yes'

FILES
Variable    Value
file    

<InMemoryUploadedFile: AwkwardlySmallIslandsDouble3x5.oramap (application/octet-stream)>

COOKIES
Variable    Value
csrftoken   

'JYQ7Tq7DPk0umTuw2q8cOBeLQOI0EGet'

_ga     

'GA1.2.875822150.1402416968'

sessionid   

'lbx2oevajcerzi7lzy8esni7uyaiaalw'

messages    

'5188ba161808520410ff86d9b96a3cf189984898$[["__json_message",0,25,"Successfully signed in as Vigor."]]'

META
Variable    Value
CONTENT_LENGTH  

'15820'

SERVER_PORT     

'80'

HTTP_REFERER    

'http://resource.openra.net/upload/map/'

SERVER_PROTOCOL     

'HTTP/1.0'

SERVER_SOFTWARE     

'gunicorn/18.0'

SCRIPT_NAME     

u''

REMOTE_PORT     

'49932'

wsgi.input  

<gunicorn.http.body.Body object at 0x7f2ab4d2e890>

REQUEST_METHOD  

'POST'

HTTP_HOST   

'resource.openra.net'

PATH_INFO   

u'/upload/map/'

wsgi.multithread    

False

QUERY_STRING    

''

HTTP_CONNECTION     

'close'

HTTP_X_REAL_IP  

'84.250.106.217'

HTTP_X_SCHEME   

'http'

HTTP_USER_AGENT     

'Mozilla/5.0 (Windows NT 6.1; rv:30.0) Gecko/20100101 Firefox/30.0'

wsgi.version    

(1, 0)

HTTP_COOKIE     

'csrftoken=JYQ7Tq7DPk0umTuw2q8cOBeLQOI0EGet; _ga=GA1.2.875822150.1402416968; sessionid=lbx2oevajcerzi7lzy8esni7uyaiaalw; messages="5188ba161808520410ff86d9b96a3cf189984898$[[\\"__json_message\\"\\0540\\05425\\054\\"Successfully signed in as Vigor.\\"]]"'

RAW_URI     

'/upload/map/'

REMOTE_ADDR     

'127.0.0.1'

wsgi.run_once   

False

wsgi.errors     

<open file '<stderr>', mode 'w' at 0x7f2abfeab1e0>

wsgi.multiprocess   

True

HTTP_ACCEPT_LANGUAGE    

'fi-fi,fi;q=0.8,en-us;q=0.5,en;q=0.3'

wsgi.url_scheme     

'http'

gunicorn.socket     

<socket._socketobject object at 0x7f2ab4da77c0>

SERVER_NAME     

'resource.openra.net'

CONTENT_TYPE    

'multipart/form-data; boundary=---------------------------22882238157049'

HTTP_ACCEPT     

'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'

wsgi.file_wrapper   

''

CSRF_COOKIE     

u'JYQ7Tq7DPk0umTuw2q8cOBeLQOI0EGet'

HTTP_ACCEPT_ENCODING    

'gzip, deflate'

Settings
Using settings module systemTool.settings
Setting     Value
OPENRA_PATH     

'/usr/local/openra/resource/OpenRA/'

USE_L10N    

True

USE_THOUSAND_SEPARATOR  

False

CSRF_COOKIE_SECURE  

False

LANGUAGE_CODE   

'en-us'

ROOT_URLCONF    

'systemTool.urls'

MANAGERS    

()

BASE_DIR    

'/home/ihptru/www/resource'

ACCOUNT_ACTIVATION_DAYS     

7

SESSION_SERIALIZER  

'django.contrib.sessions.serializers.JSONSerializer'

STATIC_ROOT     

None

ALLOWED_HOSTS   

[]

MESSAGE_STORAGE     

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX    

'[Django] '

SEND_BROKEN_LINK_EMAILS     

False

STATICFILES_FINDERS     

('django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_CACHE_ALIAS     

'default'

SESSION_COOKIE_DOMAIN   

None

SESSION_COOKIE_NAME     

'sessionid'

GITHUB_REPO     

'OpenRA'

ADMIN_FOR   

()

TIME_INPUT_FORMATS  

('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')

DATABASES   

{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.postgresql_psycopg2',
             'HOST': 'localhost',
             'NAME': 'resource',
             'OPTIONS': {},
             'PASSWORD': u'********************',
             'PORT': '',
             'TEST_CHARSET': None,
             'TEST_COLLATION': None,
             'TEST_MIRROR': None,
             'TEST_NAME': None,
             'TIME_ZONE': 'UTC',
             'USER': 'resource'}}

FILE_UPLOAD_PERMISSIONS     

None

FILE_UPLOAD_HANDLERS    

('django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE    

'text/html'

GITHUB_USER     

'ihptru'

APPEND_SLASH    

True

FIRST_DAY_OF_WEEK   

0

DATABASE_ROUTERS    

[]

YEAR_MONTH_FORMAT   

'F Y'

STATICFILES_STORAGE     

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES  

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

SERVER_EMAIL    

'root@localhost'

SESSION_COOKIE_PATH     

'/'

MIDDLEWARE_CLASSES  

('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'corsheaders.middleware.CorsMiddleware')

USE_I18N    

True

THOUSAND_SEPARATOR  

','

SECRET_KEY  

u'********************'

LANGUAGE_COOKIE_NAME    

'django_language'

DEFAULT_INDEX_TABLESPACE    

''

TRANSACTIONS_MANAGED    

False

LOGGING_CONFIG  

'django.utils.log.dictConfig'

SIGNING_BACKEND     

'django.core.signing.TimestampSigner'

TEMPLATE_LOADERS    

('django.template.loaders.filesystem.Loader',
 'django.template.loaders.app_directories.Loader')

WSGI_APPLICATION    

'systemTool.wsgi.application'

TEMPLATE_DEBUG  

True

X_FRAME_OPTIONS     

'SAMEORIGIN'

CSRF_COOKIE_NAME    

'csrftoken'

FORCE_SCRIPT_NAME   

None

USE_X_FORWARDED_HOST    

False

DEFAULT_CHARSET     

'utf-8'

SESSION_COOKIE_SECURE   

False

CSRF_COOKIE_DOMAIN  

None

FILE_CHARSET    

'utf-8'

DEBUG   

True

COMMENTS_APP    

'threadedcomments'

SESSION_FILE_PATH   

None

DEFAULT_FILE_STORAGE    

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS  

('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'registration',
 'openraData',
 'djangoratings',
 'django.contrib.sites',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'allauth.socialaccount.providers.github',
 'allauth.socialaccount.providers.google',
 'south',
 'corsheaders',
 'threadedcomments',
 'django.contrib.comments')

LANGUAGES   

(('af', 'Afrikaans'),
 ('ar', 'Arabic'),
 ('az', 'Azerbaijani'),
 ('bg', 'Bulgarian'),
 ('be', 'Belarusian'),
 ('bn', 'Bengali'),
 ('br', 'Breton'),
 ('bs', 'Bosnian'),
 ('ca', 'Catalan'),
 ('cs', 'Czech'),
 ('cy', 'Welsh'),
 ('da', 'Danish'),
 ('de', 'German'),
 ('el', 'Greek'),
 ('en', 'English'),
 ('en-gb', 'British English'),
 ('eo', 'Esperanto'),
 ('es', 'Spanish'),
 ('es-ar', 'Argentinian Spanish'),
 ('es-mx', 'Mexican Spanish'),
 ('es-ni', 'Nicaraguan Spanish'),
 ('es-ve', 'Venezuelan Spanish'),
 ('et', 'Estonian'),
 ('eu', 'Basque'),
 ('fa', 'Persian'),
 ('fi', 'Finnish'),
 ('fr', 'French'),
 ('fy-nl', 'Frisian'),
 ('ga', 'Irish'),
 ('gl', 'Galician'),
 ('he', 'Hebrew'),
 ('hi', 'Hindi'),
 ('hr', 'Croatian'),
 ('hu', 'Hungarian'),
 ('ia', 'Interlingua'),
 ('id', 'Indonesian'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('kk', 'Kazakh'),
 ('km', 'Khmer'),
 ('kn', 'Kannada'),
 ('ko', 'Korean'),
 ('lb', 'Luxembourgish'),
 ('lt', 'Lithuanian'),
 ('lv', 'Latvian'),
 ('mk', 'Macedonian'),
 ('ml', 'Malayalam'),
 ('mn', 'Mongolian'),
 ('my', 'Burmese'),
 ('nb', 'Norwegian Bokmal'),
 ('ne', 'Nepali'),
 ('nl', 'Dutch'),
 ('nn', 'Norwegian Nynorsk'),
 ('os', 'Ossetic'),
 ('pa', 'Punjabi'),
 ('pl', 'Polish'),
 ('pt', 'Portuguese'),
 ('pt-br', 'Brazilian Portuguese'),
 ('ro', 'Romanian'),
 ('ru', 'Russian'),
 ('sk', 'Slovak'),
 ('sl', 'Slovenian'),
 ('sq', 'Albanian'),
 ('sr', 'Serbian'),
 ('sr-latn', 'Serbian Latin'),
 ('sv', 'Swedish'),
 ('sw', 'Swahili'),
 ('ta', 'Tamil'),
 ('te', 'Telugu'),
 ('th', 'Thai'),
 ('tr', 'Turkish'),
 ('tt', 'Tatar'),
 ('udm', 'Udmurt'),
 ('uk', 'Ukrainian'),
 ('ur', 'Urdu'),
 ('vi', 'Vietnamese'),
 ('zh-cn', 'Simplified Chinese'),
 ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES  

False

STATICFILES_DIRS    

()

PREPEND_WWW     

False

SECURE_PROXY_SSL_HEADER     

None

SESSION_COOKIE_HTTPONLY     

True

DEBUG_PROPAGATE_EXCEPTIONS  

False

MONTH_DAY_FORMAT    

'F j'

LOGIN_URL   

'/accounts/login/'

SESSION_EXPIRE_AT_BROWSER_CLOSE     

False

TIME_FORMAT     

'P'

AUTH_USER_MODEL     

'auth.User'

DATE_INPUT_FORMATS  

('%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y')

AUTHENTICATION_BACKENDS     

('django.contrib.auth.backends.ModelBackend',
 'allauth.account.auth_backends.AuthenticationBackend')

EMAIL_HOST_PASSWORD     

u'********************'

PASSWORD_RESET_TIMEOUT_DAYS     

u'********************'

CACHE_MIDDLEWARE_ALIAS  

'default'

SESSION_SAVE_EVERY_REQUEST  

False

NUMBER_GROUPING     

0

SESSION_ENGINE  

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW   

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH    

'/'

LOGIN_REDIRECT_URL  

'/accounts/profile/'

DECIMAL_SEPARATOR   

'.'

IGNORABLE_404_URLS  

()

SITE_ID     

1

LOCALE_PATHS    

()

TEMPLATE_STRING_IF_INVALID  

''

LOGOUT_URL  

'/accounts/logout/'

EMAIL_USE_TLS   

False

FIXTURE_DIRS    

()

EMAIL_HOST  

'localhost'

DATE_FORMAT     

'N j, Y'

MEDIA_ROOT  

''

DEFAULT_EXCEPTION_REPORTER_FILTER   

'django.views.debug.SafeExceptionReporterFilter'

ADMINS  

()

FORMAT_MODULE_PATH  

None

DEFAULT_FROM_EMAIL  

'noreply@resource.openra.net'

MEDIA_URL   

''

DATETIME_FORMAT     

'N j, Y, P'

TEMPLATE_DIRS   

()

CORS_ALLO_METHODS   

('GET', 'POST')

DISALLOWED_USER_AGENTS  

()

ALLOWED_INCLUDE_ROOTS   

()

LOGGING     

{}

SHORT_DATE_FORMAT   

'm/d/Y'

GITHUB_API_TOKEN    

u'********************'

TEST_RUNNER     

'django.test.runner.DiscoverRunner'

CACHE_MIDDLEWARE_KEY_PREFIX     

u'********************'

TIME_ZONE   

'UTC'

CORS_ORIGIN_ALLOW_ALL   

True

FILE_UPLOAD_MAX_MEMORY_SIZE     

2621440

EMAIL_BACKEND   

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE  

''

TEMPLATE_CONTEXT_PROCESSORS     

('django.contrib.auth.context_processors.auth',
 'django.core.context_processors.request',
 'allauth.account.context_processors.account',
 'allauth.socialaccount.context_processors.socialaccount')

SESSION_COOKIE_AGE  

1209600

SETTINGS_MODULE     

'systemTool.settings'

USE_ETAGS   

False

LANGUAGES_BIDI  

('he', 'ar', 'fa', 'ur')

FILE_UPLOAD_TEMP_DIR    

None

INTERNAL_IPS    

()

STATIC_URL  

'/static/'

EMAIL_PORT  

25

USE_TZ  

True

SHORT_DATETIME_FORMAT   

'm/d/Y P'

PASSWORD_HASHERS    

u'********************'

ABSOLUTE_URL_OVERRIDES  

{}

RSYNC_MAP_API_PATH  

u'********************'

RSYNC_MAP_PATH  

'/home/openra/.openra/maps/'

CACHE_MIDDLEWARE_SECONDS    

600

CSRF_COOKIE_HTTPONLY    

False

DATETIME_INPUT_FORMATS  

('%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%Y-%m-%d',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%Y',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M',
 '%m/%d/%y')

ADMIN_EMAIL     

'ihptru@gmail.com'

EMAIL_HOST_USER     

''

PROFANITIES_LIST    

u'********************'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
ihptru commented 10 years ago

too many spawns.

VagueVigor commented 10 years ago

What is the limit & why?

ihptru commented 10 years ago

Do you have 30 spawns and it's on purpose and playable? or it's a test map? I can possibly reconsider restriction

VagueVigor commented 10 years ago

Its playable (i think even with 30 players), OpenRA lets me start a game in it easily and choose any spot for me.

ihptru commented 10 years ago

fixed in https://github.com/ihptru/OpenRA-Resources/commit/50dff016e58bbd37d30680800f7fe0812d61cafa You can now use at least 128 spawn slots; 142 is possible maximal restriction with values like "_,_"