Reinhard_Kraasch created this task.
Reinhard_Kraasch added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **Input: **
  **Just one line in PAWS notebook**
  
  import pywikibot
  
  **Error message:**
  
    ImportError                               Traceback (most recent call last)
    Cell In[5], line 1
    ----> 1 import pywikibot 
    
    File /srv/paws/lib/python3.10/site-packages/pywikibot/__init__.py:21
         18 from urllib.parse import urlparse
         19 from warnings import warn
    ---> 21 from pywikibot import config as _config
         22 from pywikibot import exceptions
         23 from pywikibot.__metadata__ import __copyright__, __url__, 
__version__
    
    File /srv/paws/lib/python3.10/site-packages/pywikibot/config.py:951
        949 elif OSWIN32 or _filemode & 0o02 == 0:
        950     with open(_filename, 'rb') as f:
    --> 951         exec(compile(f.read(), _filename, 'exec'), _exec_globals)
        952 else:
        953     warning(f'Skipped {_filename!r}: writeable by others.')
    
    File /srv/paws/user-config.py:9
          7 if os.path.exists(custom_path):
          8     with open(custom_path, "rb") as f:
    ----> 9         exec(compile(f.read(), custom_path, "exec"), globals())
         11     del f
         12 # Clean up temp variables, since pwb issues a warning otherwise
         13 # to help people catch misspelt config
    
    File ~/user-config.py:6
          1 # This is an automatically generated file. You can find more
          2 # configuration parameters in 'config.py' file or refer
          3 # 
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.config.html
          4 from typing import Optional, Union
    ----> 6 from pywikibot.backports import Dict, List, Tuple
          8 # The family of sites to be working on.
          9 # Pywikibot will import families/xxx_family.py so if you want to 
change
         10 # this variable, you have to ensure that such a file exists. You 
may use
         11 # generate_family_file to create one.
         12 family = 'wikipedia'
    
    ImportError: cannot import name 'List' from 'pywikibot.backports' 
(/srv/paws/lib/python3.10/site-packages/pywikibot/backports.py)

TASK DETAIL
  https://phabricator.wikimedia.org/T362491

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Reinhard_Kraasch
Cc: Aklapper, pywikibot-bugs-list, Reinhard_Kraasch, mevo, PotsdamLamb, 
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
Xqt, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to