Giter VIP home page Giter VIP logo

Comments (3)

matejsuchanek avatar matejsuchanek commented on June 19, 2024

S těmi importy vlastních nástrojů je to problém, občas funguje from .X, občas tam ta tečka být nemá. Dřív tam byla potřeba, teď už možná ne...

from pywikibot-scripts.

JAnDud avatar JAnDud commented on June 19, 2024

odstranil jsem postupně všechny tečky a teď dostávám
C:\pwb>pwb.py clean_commonscat.py -cat:Údržba:Commonscat_není_na_Wikidatech WARNING: CommonscatCleaningBot.__init__ set the Bot.site property; this is only needed when the Bot accesses many sites. Traceback (most recent call last): File "C:\pwb\pwb.py", line 39, in <module> sys.exit(main()) File "C:\pwb\pwb.py", line 35, in main runpy.run_path(str(path), run_name='__main__') File "C:\Python310\lib\runpy.py", line 289, in run_path return _run_module_code(code, init_globals, run_name, File "C:\Python310\lib\runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "C:\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\pwb\pywikibot\scripts\wrapper.py", line 513, in <module> main() File "C:\pwb\pywikibot\scripts\wrapper.py", line 497, in main if not execute(): File "C:\pwb\pywikibot\scripts\wrapper.py", line 484, in execute run_python_file(filename, script_args, module) File "C:\pwb\pywikibot\scripts\wrapper.py", line 147, in run_python_file exec(compile(source, filename, 'exec', dont_inherit=True), File "C:\pwb\scripts\userscripts\clean_commonscat.py", line 147, in <module> main() File "C:\pwb\scripts\userscripts\clean_commonscat.py", line 143, in main bot.run() File "C:\pwb\pywikibot\bot.py", line 1756, in run super().run() File "C:\pwb\pywikibot\bot.py", line 1644, in run self.setup() File "C:\pwb\scripts\userscripts\clean_commonscat.py", line 42, in setup r'\s*\n==+ *Externí odkazy *==+ *\n\s*' ValueError: unexpected '{' in field name CRITICAL: Exiting due to uncaught exception ValueError: unexpected '{' in field name

from pywikibot-scripts.

JAnDud avatar JAnDud commented on June 19, 2024

Skript už se spustí, ale spadne

C:\pwb>pwb.py clean_commonscat.py -cat:Údržba:Commonscat_není_na_Wikidatech
WARNING: Http response status 404
WARNING: CommonscatCleaningBot.__init__ set the Bot.site property; this is only needed when the Bot accesses many sites.
Retrieving 50 pages from wikipedia:cs.


>>> .356 TSW <<<
Executing remaining deferred callbacks: 0 left

1 read operation
Execution time: 3 seconds
Read operation time: 3.0 seconds
Script terminated by exception:

ERROR: invalid group reference 1 at position 5 (error)
Traceback (most recent call last):
  File "C:\pwb\pwb.py", line 39, in <module>
    sys.exit(main())
  File "C:\pwb\pwb.py", line 35, in main
    runpy.run_path(str(path), run_name='__main__')
  File "C:\Python310\lib\runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Python310\lib\runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\pwb\pywikibot\scripts\wrapper.py", line 513, in <module>
    main()
  File "C:\pwb\pywikibot\scripts\wrapper.py", line 497, in main
    if not execute():
  File "C:\pwb\pywikibot\scripts\wrapper.py", line 484, in execute
    run_python_file(filename, script_args, module)
  File "C:\pwb\pywikibot\scripts\wrapper.py", line 147, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File "C:\pwb\scripts\userscripts\clean_commonscat.py", line 146, in <module>
    main()
  File "C:\pwb\scripts\userscripts\clean_commonscat.py", line 142, in main
    bot.run()
  File "C:\pwb\pywikibot\bot.py", line 1749, in run
    super().run()
  File "C:\pwb\pywikibot\bot.py", line 1664, in run
    self.treat(page)
  File "C:\pwb\pywikibot\bot.py", line 1917, in treat
    self.treat_page()
  File "C:\pwb\scripts\userscripts\clean_commonscat.py", line 93, in treat_page
    page_replaced_text = self.empty_sectionR.sub(
  File "C:\Python310\lib\re.py", line 326, in _subx
    template = _compile_repl(template, pattern)
  File "C:\Python310\lib\re.py", line 317, in _compile_repl
    return sre_parse.parse_template(repl, pattern)
  File "C:\Python310\lib\sre_parse.py", line 1048, in parse_template
    addgroup(int(this[1:]), len(this) - 1)
  File "C:\Python310\lib\sre_parse.py", line 992, in addgroup
    raise s.error("invalid group reference %d" % index, pos)
re.error: invalid group reference 1 at position 5
CRITICAL: Exiting due to uncaught exception error: invalid group reference 1 at position 5

from pywikibot-scripts.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.