Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#53084 closed defect (fixed)

py-spyder: doesn't start

Reported by: mkae (Marko Käning) Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec)
Port: py-spyder, py35-spyder-devel

Description

When I start spyder on a console I get this crash:

$ spyder
Traceback (most recent call last):
  File "/opt/local/bin/spyder", line 2, in <module>
    from spyderlib import start_app
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyderlib/start_app.py", line 15, in <module>
    from spyderlib.baseconfig import get_conf_path, running_in_mac_app
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyderlib/baseconfig.py", line 241, in <module>
    _ = get_translation("spyderlib")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyderlib/baseconfig.py", line 216, in get_translation
    lang = locale.getdefaultlocale()[0]
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 545, in getdefaultlocale
    return _parse_localename(localename)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Setting this:

MVM7-5:mkae-macports-ports marko$ LANG=C spyder
Segmentation fault: 11

isn't better.

What am I missing?

Change History (6)

comment:1 Changed 8 years ago by mkae (Marko Käning)

Port: py35-spyder-devel added

Same happens for the Python 3.5 devel-version!

comment:2 Changed 8 years ago by mkae (Marko Käning)

If I start spyder using

$ LANG=C spyder

it actually does start fine, although spitting out this on the console:

Fontconfig warning: ignoring UTF-8: not a valid region tag
2017-01-21 20:34:13.962 Python[20512:497221] modalSession has been exited prematurely - check for a reentrant call to endModalSession:

comment:3 Changed 8 years ago by eborisch (Eric A. Borisch)

What happens if you set LANG=en_US.UTF-8 ? What does env | sort contain?

comment:4 in reply to:  3 Changed 8 years ago by mkae (Marko Käning)

Replying to eborisch:

What happens if you set LANG=en_US.UTF-8 ? What does env | sort contain?

It still says:

$ LANG=en_US.UTF-8 spyder
Fontconfig warning: ignoring UTF-8: not a valid region tag

Here is the environment:

$ ( LANG=en_US.UTF-8 env ) | sort
AUTOJUMP_ERROR_PATH=/Users/marko/Library/autojump/errors.log
AUTOJUMP_SOURCED=1
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.dtIngel3Sh/Render
CLICOLOR=
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/private/tmp/com.apple.launchd.szMZ2ugsYb/unix_domain_listener
GPG_AGENT_INFO=/private/tmp/com.apple.launchd.sc3190JREP/Listeners_agent
HISTCONTROL=ignoredups
HISTFILESIZE=500000
HISTIGNORE=&:ls:[bf]g:exit
HISTSIZE=500000
HOME=/Users/marko
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LOGNAME=marko
MANPATH=/opt/local/share/man:
OLDMANPATH=
OLDPATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PATH=/opt/local/bin:/opt/local/sbin:/Users/marko/bin:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/gnubin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PORTPREFIX=/opt/local
PS1=\h:\W \u\$ 
PWD=/Users/marko
SECURITYSESSIONID=186b4
SHELL=/bin/bash
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.eoUBKSlhjI/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=361.1
TERM_SESSION_ID=E46DC2ED-7DCD-4537-BFB2-5B85C386D7C3
TMPDIR=/var/folders/xd/_025xt7j6dggsjd0_6tczq180000gn/T/
USER=marko
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_=/opt/local/libexec/gnubin/env
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0

comment:5 Changed 6 years ago by reneeotten <reneeotten@…>

Resolution: fixed
Status: newclosed

In 02dbda93fd387382b6c0fd04fe276d2ba163b5cb/macports-ports (master):

py-spyder: update to version 3.2.8

  • use the py-spyder-devel Portfile as starting point

Closes: #51375
(updated v2.3.8 to latest released version)

Closes: #53084
(seems fixed by upstream and/or patch-spyder_app_start.py.diff)

comment:6 Changed 6 years ago by jmroot (Joshua Root)

For the record, the important environment variable here is LC_CTYPE, not LANG.

Note: See TracTickets for help on using tickets.