Package: asciinema
Version: 0.9.8-1
Good morning again Gustavo,
When $HOME does not exist, asciinema fails to start.
To reproduce:
[[[
$ HOME=/foo asciinema
Traceback (most recent call last):
File "/usr/lib/python3.4/configparser.py", line 761, in get
value = d[option]
File "/usr/lib/python3.4/collections/__init__.py", line 805, in __getitem__
return self.__missing__(key) # support subclasses that define
__missing__
File "/usr/lib/python3.4/collections/__init__.py", line 797, in __missing__
raise KeyError(key)
KeyError: 'token'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 50, in
api_token
return self._get_api_token()
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 64, in
_get_api_token
return self.config.get('api', 'token')
File "/usr/lib/python3.4/configparser.py", line 764, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option 'token' in section: 'api'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/configparser.py", line 761, in get
value = d[option]
File "/usr/lib/python3.4/collections/__init__.py", line 805, in __getitem__
return self.__missing__(key) # support subclasses that define
__missing__
File "/usr/lib/python3.4/collections/__init__.py", line 797, in __missing__
raise KeyError(key)
KeyError: 'token'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 53, in
api_token
return self._get_user_token()
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 67, in
_get_user_token
return self.config.get('user', 'token')
File "/usr/lib/python3.4/configparser.py", line 764, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option 'token' in section: 'user'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/asciinema", line 9, in <module>
load_entry_point('asciinema==0.9.8', 'console_scripts', 'asciinema')()
File "/usr/lib/python3/dist-packages/asciinema/__main__.py", line 7, in main
get_command(sys.argv[1:], Config()).execute()
File "/usr/lib/python3/dist-packages/asciinema/commands/builder.py", line 41,
in get_command
return RecordCommand(config.api_url, config.api_token, cmd, title,
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 55, in
api_token
return self._create_api_token()
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 73, in
_create_api_token
self._ensure_base_dir()
File "/usr/lib/python3/dist-packages/asciinema/config.py", line 61, in
_ensure_base_dir
os.mkdir(dir)
FileNotFoundError: [Errno 2] No such file or directory: '/foo/.asciinema'
]]]
I would expect asciinema to operate even when $HOME doesn't exist.
Cheers,
Daniel
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.3.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages asciinema depends on:
ii python3 3.4.3-7
ii python3-requests 2.9.1-1
pn python3:any <none>
asciinema recommends no packages.
asciinema suggests no packages.
-- debconf-show failed