question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

shub deploy does not run on windows

See original GitHub issue
c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\setuptools\distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
  warnings.warn(
Building images.scrapinghub.com/project/485868:1607361205.
Traceback (most recent call last):
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\shyim\AppData\Local\Programs\Python\Python39\Scripts\shub.exe\__main__.py", line 7, in <module>
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\shub\deploy.py", line 78, in cli
    upload_cmd(target, version)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\shub\image\upload.py", line 54, in upload_cmd
    build.build_cmd(target, version, skip_tests, no_cache, build_arg, filename=filename)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\shub\image\build.py", line 80, in build_cmd
    build_progress = build_progress_cls(events)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\shub\image\build.py", line 110, in __init__
    self.bar = utils.create_progress_bar(
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\shub\image\utils.py", line 289, in create_progress_bar
    return ProgressBar(
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\tqdm\_tqdm.py", line 383, in __new__
    cls.monitor = TMonitor(cls, cls.monitor_interval)
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\tqdm\_tqdm.py", line 68, in __init__
    getattr(sys, 'setcheckinterval'))(100)
AttributeError: module 'sys' has no attribute 'setcheckinterval'
Exception ignored in: <function tqdm.__del__ at 0x000002A70E3545E0>
Traceback (most recent call last):
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\tqdm\_tqdm.py", line 764, in __del__
    self.close()
  File "c:\users\shyim\appdata\local\programs\python\python39\lib\site-packages\tqdm\_tqdm.py", line 994, in close
    if self.disable:
AttributeError: 'ProgressBar' object has no attribute 'disable'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rafaelcapuchocommented, Jan 4, 2021

May it be an unnecessary leftover from the time when shub only allowed locked versions of dependencies?

@Gallaecio it is mostly related to this: https://github.com/scrapinghub/shub/pull/383#pullrequestreview-436386760

basically newer versions of tqdm generates a little bit different progress bars, which fails in our unittests, that is why it was pinned in the first place, we can upgrade tqdm but it would also require a fix/rework in the test cases.

or removing the tqdm’s test cases, I’m not so sure why we were testing the progress bar ourselfs.

1reaction
Gallaeciocommented, Dec 15, 2020

I’ve tried a shub deploy with the latest version of tqdm, and it worked. Is it possible we simply need to remove ==4.11.2 from setup.py? May it be an unnecessary leftover from the time when shub only allowed locked versions of dependencies?

Read more comments on GitHub >

github_iconTop Results From Across the Web

shub not executable in windows in any folder other than c ...
I am using windows 10 and Python2. 7. I installed shub by doing below in the command line. 'shub' is not recognized as...
Read more >
shub Documentation
From anywhere within the project directory tree, you can now deploy via shub deploy. Next, schedule one of your spiders to run on...
Read more >
Requirements error deploying to scrapy cloud with shub deploy
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >
shub/configuration.rst at master · scrapinghub/shub - GitHub
This tells shub to deploy to the Scrapy Cloud project 12345 when you run shub deploy . Often, you will have multiple projects...
Read more >
shub - PyPI
This allows you to run shub deploy prod instead of shub deploy 33333. version is a string to be used as project version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found