Forum Archive

Is concurrent.futures supposed to work on iOS?

mikael

All the examples I have tried on 3.5 give this exception:

Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/447A26CB-FA57-4E8A-8C34-082F55AD274F/Pythonista3/Documents/Testailut/concurr-futur.py", line 1, in
import concurrent.futures
File "/private/var/mobile/Containers/Shared/AppGroup/447A26CB-FA57-4E8A-8C34-082F55AD274F/Pythonista3/Documents/site-packages/concurrent/futures/init.py", line 8, in
from concurrent.futures._base import (FIRST_COMPLETED,
File "/private/var/mobile/Containers/Shared/AppGroup/447A26CB-FA57-4E8A-8C34-082F55AD274F/Pythonista3/Documents/site-packages/concurrent/futures/_base.py", line 357
raise type(self._exception), self._exception, self._traceback
^
SyntaxError: invalid syntax

dgelessus

It looks like you have a copy of concurrent.futures in your site-packages, which seems to be for Python 2 (since it uses the old raise syntax). Try deleting that and restart Pythonista, that way the standard concurrent.futures from Python 3 should take priority again.

mikael

@dgelessus, thanks, that was it.