Seppl2013 added a comment.

  If you then do a
  
    import pywikibot
  
  This will already activate some code which might fail. Even if you do
  
    import os
    os.environ["PYWIKIBOT_NO_USER_CONFIG"]="2"
  
  you might end up with an exception. Since code I am publishing might be 
downloaded by users in lots of different environments this essentially forces 
each and every user to configure things to avoid the exception which is not 
feasible. There is a bad need to avoid this problem. Currently i am thinking 
about something like a
  
    try:
      import pywikbot
    except Exception as ex:
      # ignore it or do something about it
      pass
  
  which looks like a very ugly workaround which i would love to avoid and 
therefore added this issue to hope for an upstream fix.

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

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

To: Seppl2013
Cc: Xqt, pywikibot-bugs-list, Aklapper, Seppl2013, Danmichaelo, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to