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.

Scapyd raise NotADirectoryError from .egg file

See original GitHub issue

I added some text file to my project and when I run scrapyd server from the same folder as my project - all work fine. But If I run scrapyd from supervisor and sending a request for crawling - I’m getting error

File "/tmp/exa-1504178736-lyojtcmr.egg/exa/pipelines.py", line 29, in __init__
  File "/tmp/exa-1504178736-lyojtcmr.egg/exa/classificator/news_classify_tag.py", line 29, in __init__
NotADirectoryError: [Errno 20] Not a directory: '/tmp/exa-1504178736-lyojtcmr.egg/exa/classificator/large.txt'

My setup.py file looks like this

from setuptools import setup, find_packages

setup(
    name='project',
    version='1.0',
    packages=find_packages() + ['exa'],
    entry_points={'scrapy': ['settings = exa.settings']},
    package_dir={'exa': 'exa'},
    package_data={'exa': ['classificator/large.txt']}
)

Why am I getting this error when scrapyd works as a daemon?

Issue Analytics

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

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Scapyd raise NotADirectoryError from .egg file - Stack Overflow
I fixed this issues, need to use pkg_resources.resource_stream(resource_package, resource_path) for loading file from .egg file.
Read more >
[Example code]-Error during pip install ldavis
I have been attempting to install a Python package by the name of 'pyLDAvis' from cmd with no success since over a day...
Read more >
The Internal Structure of Python Eggs - Setuptools
A “Python egg” is a logical structure embodying the release of a specific version ... .egg-info format: a file or directory placed adjacent...
Read more >
scapyd raise notadirectoryerror from .egg file - splunktool
scapyd raise notadirectoryerror from .egg file. Last Updated : Tue Sep 06 2022. But if I run Scrapyd server from project dir, all...
Read more >
Build system - CARLA Simulator - Read the Docs
Requirements, rpclib, gtest, boost, rpclib, boost. std runtime, LLVM's libc++ ... One file is a .whl file and the other is an .egg...
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