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.

rename spider will load the old left .pyc instead of renamed spider

See original GitHub issue

Hi all, I’m not sure if this is an issue. If got y.py and y.pyc in the spider directory. Then rename it with mv y.py x.py and update the new x.py. After updates, run scrapy crawl spider will use the old version of spider instead of updates in the x.py. Have to remove y.pyc first. Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
kmikecommented, Sep 19, 2016

I think we shouldn’t mess with pyc files and implement special handling of them; pyc files are standard Python feature and it’d be too opinionated to assume that .pyc modules shouldn’t be loaded - e.g. someone may choose to deploy pyc files instead of .py files.

What I think we should do is to warn if there are several spiders with the same name. It is a more general problem; it is specific to scrapy, not to .pyc files handling.

0reactions
ghostcommented, Oct 1, 2017

Arrived here searching DuckDuckGo for “There are several spiders with the same name” in quotes.

I’m new to Python and this discussion helped me when I needed to get past the warning mentioned in the title, especially given Atom editor hides files with the pyc extension in its interface by default—I had no idea the compiled files were even there! Thank you!! 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

scrapy crawl [spider-name] fault - Stack Overflow
This will prevent .pyc files from being created. Especially useful if you are working on a project and you rename the file name...
Read more >
Where The "Pringles Spider" Campaign Went Wrong | Latana
Stackable chip brand Pringles wants to rename a spider with an uncanny resemblance to its logo. But the campaign hasn't hit the mark....
Read more >
2.4 PDF - Scrapy Documentation
Scrapy is an application framework for crawling web sites and extracting structured data which can be used for a wide.
Read more >
Python 1.6.1
Note: See the download pages for more recent releases. What's new? Python 1.6 was the last of the versions developed at CNRI and...
Read more >
Mozilla Firefox Release Notes
with wind… 778460, Tinderbox spidermonkey-rootanalysis builds broken since 2012-07-17 ... 762156, PDF Viewer does not finish loading page.
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