Scrapy: how to rename project
See original GitHub issueI have created a new project with this command : scrapy startproject first_scrapy
But now i want to change this project name to “web_crawler” . After i tried to change project name , i can not start scrapy command . I got this error :
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\scrapy.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\scrapy\cmdline.py", line 108, in execute
settings = get_project_settings()
File "c:\python27\lib\site-packages\scrapy\utils\project.py", line 68, in get_project_settings
settings.setmodule(settings_module_path, priority='project')
File "c:\python27\lib\site-packages\scrapy\settings\__init__.py", line 282, in setmodule
module = import_module(module)
File "c:\python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named first_scrapy.settings
So how can i rename old project ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Rename scrapy project - python - Stack Overflow
Basically, you only need to change default = new_project_title under [settings] in scrapy.cfg ...
Read more >[Example code]-Rename scrapy project - appsloveworld
I want to rename my Scrapy project, spiders made, JSONs created but want to change the name to something meaningful without messing anything...
Read more >Renaming Projects | PyCharm Documentation - JetBrains
Right-click the root folder of your project and select Refactor | Rename from the context menu or press Shift+F6 . In the dialog...
Read more >Release notes — Scrapy 1.8.3 documentation
Warn users when project contains duplicate spider names (fixes issue 2181) ... assertItemsEqual was renamed to assertCountEqual in Python 3. (issue 1070).
Read more >Downloading and processing files and images - Scrapy Docs
To enable your media pipeline you must first add it to your project ITEM_PIPELINES setting. For Images Pipeline, use: ITEM_PIPELINES = {'scrapy.pipelines.images ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

i had the same problem recently too.
the solution is pretty simple. when you change your file name scrapy setting settings.py has no idea and still refer to the root project module using the previous file name. just change the name to be consistent with your new file name in your settings.py
change the old name to the new file name in places where the old filename is being referred to.
hope this helps you.
i have deleted all
.pycfile and still no results