[Errno 2] No such file or directory
  • I'm having trouble with the installation steps of Superdesk. 
    I'm running Crunchbang (Waldorf) and install gets stuck at step 3
    "3. Build eggs by running the following command:
    [path_to_superdesk]/build-egg"

    I confirm I am running Python 3.2
    ~$ python3 -V
    Python 3.2.3

    And this is the error I receive
    ~$ /var/opt/ally-py/superdesk/build-eggs
    python3: can't open file '../components/build_egg.py': [Errno 2] No such file or directory
    python3: can't open file '../plugins/build_egg.py': [Errno 2] No such file or directory
    python3: can't open file 'plugins/build_egg.py': [Errno 2] No such file or directory
    python3: can't open file 'plugins/copy_eggs.py': [Errno 2] No such file or directory

    Navigating to this cloned directory I see the same files that are supposedly not there. I saw a previous thread where the user was informed to use Python 3.2 which I confirmed I am using having just downloaded it direct form python.org
    Post edited by David Ross at 2014-03-29 16:12:13
  • 20 Comments sorted by
  • Interestingly:
    cd: /var/opt/ally-py/superdesk/components: No such file or directory

    Yet going in via my gui fie manager (thunar) I can clearly see the directory and the build_egg.py

    Never seen such behaviour before
  • You have to clone Superdesk git repository inside Ally-Py git repository, so as result you will have the following directory structure:

    Ally-Py
           - components
           - plugins
           - superdesk
                 - plugins
                 - .... (others directories and files)
                 - distribution 
          - ... (others directories and files)
          - distribution

  • Actually I believe I had already done that. I just repeated the process and had the same error.

    Then I tried doing the build_eggs thing from the ally-py directory first.. which proceeded 
    and then the build_eggs from the superdesk directory .. which proceeded

    below is the terminal print.. I note there is a couple of directories still unfound.. should I worry about this?

    ........................................................................
    $ /var/opt/ally-py/build-eggs
    python3: can't open file 'components/build_egg.py': [Errno 2] No such file or directory
    *** BUILD livedesk-sync-1.0
    ------------------------------------------------------------------------------

    *** CLEAN livedesk-sync-1.0
    ------------------------------------------------------------------------------

    *** BUILD livedesk-embed-1.0
    ------------------------------------------------------------------------------

    *** CLEAN livedesk-embed-1.0
    ------------------------------------------------------------------------------

    python3: can't open file 'superdesk/plugins/build_egg.py': [Errno 2] No such file or directory
    david@netbook:/var/opt/ally-py/superdesk$ /var/opt/ally-py/superdesk/build-eggs
    *** BUILD livedesk-sync-1.0
    ------------------------------------------------------------------------------

    *** CLEAN livedesk-sync-1.0
    ------------------------------------------------------------------------------

    *** BUILD livedesk-embed-1.0
    ------------------------------------------------------------------------------

    *** CLEAN livedesk-embed-1.0
    ------------------------------------------------------------------------------

    Copying /var/opt/ally-py/distribution/components/ally_core-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_core_sqlalchemy-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/service_cdm-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_http_asyncore_server-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_core_http-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/service_gateway_recaptcha-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_http_mongrel2_server-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/service_gateway-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_plugin-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_http-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally_api-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/components/ally-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/components
    Copying /var/opt/ally-py/distribution/plugins/gui_action-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/gateway-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/internationalization-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/gui_core-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/support_acl-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/support_sqlalchemy-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/captcha-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/security-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/support_cdm-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/administration-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Copying /var/opt/ally-py/distribution/plugins/security_rbac-1.0.dev-py3.2.egg
         to /var/opt/ally-py/superdesk/distribution/plugins
    Post edited by David Ross at 2014-04-08 07:31:39
  • And if I proceed to step 4 in the Superdesk install.txt I'm met with another problem

    --------------------------------------
    $ python3 /var/opt/ally-py/superdesk/distribution/application.py -dump
    Failed to fetch a value for configuration '__setup__.ally_gateway.processor.gateway_uri': There is no gateway URI provided
    Failed to fetch a value for configuration '__setup__.ally_gateway.processor.gateway_authorized_uri': There is no authorized gateway URI provided
    Failed to fetch a value for configuration '__setup__.ally_gateway.processor.external_host': No external host provided
    Failed to fetch a value for configuration '__setup__.ally_gateway_recaptcha.processor.gateway_captcha_uri': There is no gateway URI provided
    Created "application.properties" configuration file
    Created "plugins.properties" configuration file
    ================================================== Application started in 25.39 seconds
  • After you clone ally-py repository, the file build_egg.py should exists on ally-py/components directory (see https://github.com/sourcefabric/Ally-Py/tree/master/components)

    So please check this.
    If the file in not there please clone again ally-py repository.
    If the file is there check the rights on this file.
  • About:
    "And if I proceed to step 4 in the Superdesk install.txt I'm met with another problem"

    Just ignore the messages and start the server.
    And
    if I proceed to step 4 in the Superdesk install.txt I'm met with
    another problem - See more at:
    http://forum.sourcefabric.org/discussion/16498/errno-2-no-such-file-or-directory#sthash.N9klGVJT.dpuf
    And
    if I proceed to step 4 in the Superdesk install.txt I'm met with
    another problem - See more at:
    http://forum.sourcefabric.org/discussion/16498/errno-2-no-such-file-or-directory#sthash.N9klGVJT.dpuf
  • Starting again.. which particular folders/files will need chmod? I think currently they are all 755. Folders and files.

    ---------------------------------------
    $ sudo git clone https://github.com/sourcefabric/Ally-Py.git /var/opt/all-py/
    Cloning into '/var/opt/all-py'...
    remote: Reusing existing pack: 45606, done.
    remote: Counting objects: 77, done.
    remote: Compressing objects: 100% (76/76), done.
    remote: Total 45683 (delta 15), reused 0 (delta 0)
    Receiving objects: 100% (45683/45683), 47.04 MiB | 473 KiB/s, done.
    Resolving deltas: 100% (25834/25834), done.
    Checking out files: 100% (4944/4944), done.

    $ sudo mkdir /var/opt/ally-py/superdesk/

    $ sudo git clone https://github.com/sourcefabric/Superdesk.git /var/opt/ally-py/superdesk
    Cloning into '/var/opt/ally-py/superdesk'...
    remote: Reusing existing pack: 77572, done.
    remote: Counting objects: 19, done.
    remote: Compressing objects: 100% (18/18), done.
    remote: Total 77591 (delta 2), reused 11 (delta 1)
    Receiving objects: 100% (77591/77591), 131.10 MiB | 399 KiB/s, done.
    Resolving deltas: 100% (43981/43981), done.
    Checking out files: 100% (6505/6505), done.

    $ ls /var/opt/ally-py/
    build      build-eggs  distribution  documentor   plugins  readme.md  superdesk
    build.bat  components  doc           INSTALL.txt  README   sandbox

    $ ls /var/opt/ally-py/superdesk/
    airtime        distribution  plugins    start.bat          start-sources.sh
    build          doc           README     start-dump.bat
    build-eggs     documentor    readme.md  start-mongo.bat
    build-package  INSTALL.txt   sandbox    start-sources.bat

    $ /var/opt/ally-py/superdesk/build-eggs
    python3: can't open file '../components/build_egg.py': [Errno 2] No such file or directory
    python3: can't open file '../plugins/build_egg.py': [Errno 2] No such file or directory
    python3: can't open file 'plugins/build_egg.py': [Errno 2] No such file or directory
    python3: can't open file 'plugins/copy_eggs.py': [Errno 2] No such file or directory
  • hi, from which dir you run this build-eggs command ? i think it's using relative paths so it might work via:

        cd /var/opt/ally-py/superdesk/ && ./build-eggs
  • Ha thanks Petr. Still further issues..

    $ cd /var/opt/ally-py/superdesk/ && ./build-eggs
    *** BUILD ally_http_asyncore_server-1.0
    error: could not create 'ally_http_asyncore_server.egg-info': Permission denied
    *** BUILD captcha-1.0
    error: could not create 'captcha.egg-info': Permission denied
    *** BUILD binary_exiv2-1.0
    error: could not create 'binary_exiv2.egg-info': Permission denied
    Traceback (most recent call last):
      File "plugins/copy_eggs.py", line 24, in <module>
        if not isdir(dstDir): makedirs(dstDir)
      File "/usr/lib/python3.2/os.py", line 152, in makedirs
        mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/var/opt/ally-py/superdesk/distribution/components'
    Post edited by David Ross at 2014-04-11 04:54:26
  • and when u run it with sudo like the other commands?

    $ cd /var/opt/ally-py/superdesk && sudo ./build-eggs

  • Oh of course. Goodness me I need to slap myself awake clearly. Thanks my man. 

    Petr and Ioan, I really appreciate your help. Finally installed with no errors.


    EDIT: and then again starting the REST ally server

    Have an awesome weekend!
    Post edited by David Ross at 2014-04-11 05:20:12
  • There was essentially the same errors but with a few permission errors thrown in so I ran again as sudo and still had a ton of problems by the looks...

    ................................

    $ sudo python3 /var/opt/ally-py/superdesk/distribution/application.py
    INFO     Nothing to report for 'Active rights', everything fits nicely                                        ally.design.processor.assembly
    INFO     Nothing to report for 'Users gateways', everything fits nicely                                       ally.design.processor.assembly
    INFO     Nothing to report for 'Captcha gateways', everything fits nicely                                     ally.design.processor.assembly
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    A setup or configuration error occurred while deploying, try to rebuild the application properties by running the the application with "-dump" option
    Traceback (most recent call last):
      File "/var/opt/ally-py/superdesk/distribution/libraries/pymongo-2.4.2-py3.2-linux-i686.egg/pymongo/mongo_client.py", line 266, in __init__
        self.__find_node(seeds)
      File "/var/opt/ally-py/superdesk/distribution/libraries/pymongo-2.4.2-py3.2-linux-i686.egg/pymongo/mongo_client.py", line 641, in __find_node
        raise AutoReconnect(', '.join(errors))
    pymongo.errors.AutoReconnect: could not connect to localhost:27017: [Errno 111] Connection refused

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/var/opt/ally-py/superdesk/distribution/libraries/mongoengine-0.7.9-py3.2.egg/mongoengine/connection.py", line 124, in get_connection
        _connections[alias] = connection_class(**conn_settings)
      File "/var/opt/ally-py/superdesk/distribution/libraries/pymongo-2.4.2-py3.2-linux-i686.egg/pymongo/connection.py", line 180, in __init__
        max_pool_size, document_class, tz_aware, _connect, **kwargs)
      File "/var/opt/ally-py/superdesk/distribution/libraries/pymongo-2.4.2-py3.2-linux-i686.egg/pymongo/mongo_client.py", line 269, in __init__
        raise ConnectionFailure(str(e))
    pymongo.errors.ConnectionFailure: could not connect to localhost:27017: [Errno 111] Connection refused

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 183, in processForName
        try: value = self.fetchForName(name)()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_call.py", line 331, in __call__
        Initializer.initialize(value)
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_entity.py", line 60, in initialize
        initializer._entityInit(entity, *args, **keyargs)
      File "/var/opt/ally-py/superdesk/distribution/plugins/content_publisher-1.0.dev-py3.2.egg/content/publisher/impl/publisher.py", line 49, in __init__
        mongoengine.connect(self.mongodb_database, host=self.mongodb_server, port=self.mongodb_port)
      File "/var/opt/ally-py/superdesk/distribution/libraries/mongoengine-0.7.9-py3.2.egg/mongoengine/connection.py", line 162, in connect
        return get_connection(alias)
      File "/var/opt/ally-py/superdesk/distribution/libraries/mongoengine-0.7.9-py3.2.egg/mongoengine/connection.py", line 126, in get_connection
        raise ConnectionError("Cannot connect to database %s :\n%s" % (alias, e))
    mongoengine.connection.ConnectionError: Cannot connect to database default :
    could not connect to localhost:27017: [Errno 111] Connection refused

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_support.py", line 99, in followWiring
        try: setattr(value, wentity.name, entityFor(wentity.type, wentity.name))
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/support.py", line 347, in entityFor
        try: return assembly.processForName(entities[0])
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 186, in processForName
        (name, ', '.join(self._processing)))
    ally.container.error.SetupError: Exception occurred for '__plugin__.content_publisher.service.publisherService' in processing chain 'loader_211348252, __plugin__.content_article.service.articleFileService, __plugin__.content_article.service.articleService, __plugin__.content_publisher.service.publisherService'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_support.py", line 99, in followWiring
        try: setattr(value, wentity.name, entityFor(wentity.type, wentity.name))
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/support.py", line 347, in entityFor
        try: return assembly.processForName(entities[0])
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 183, in processForName
        try: value = self.fetchForName(name)()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_call.py", line 326, in __call__
        if followUp: followUp()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_support.py", line 101, in followWiring
        (wentity.name, locationStack(value.__class__)))
    ally.container.error.SetupError: Cannot solve wiring 'contentPublisherService' at: 
      File "/var/opt/ally-py/superdesk/distribution/plugins/content_article-1.0.dev-py3.2.egg/content/article/impl/article.py", line 37

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/__deploy__/ally/deploy.py", line 71, in deploy
        context.processStart()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/context.py", line 96, in processStart
        for call in calls: assembly.processForName(call.name)
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 183, in processForName
        try: value = self.fetchForName(name)()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_call.py", line 211, in __call__
        ret = self.call()
      File "/var/opt/ally-py/superdesk/distribution/components/ally_plugin-1.0.dev-py3.2.egg/__setup__/ally_plugin/deploy_plugin.py", line 91, in deploy
        try: context.processStart()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/context.py", line 96, in processStart
        for call in calls: assembly.processForName(call.name)
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 183, in processForName
        try: value = self.fetchForName(name)()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_call.py", line 211, in __call__
        ret = self.call()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/support.py", line 214, in loadAll
        if name.startswith(prefix) and isinstance(call, CallEntity) and call.isOf(clazz): Assembly.process(name)
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 90, in process
        return ass.processForName(name)
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_assembly.py", line 183, in processForName
        try: value = self.fetchForName(name)()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_call.py", line 326, in __call__
        if followUp: followUp()
      File "/var/opt/ally-py/superdesk/distribution/components/ally-1.0.dev-py3.2.egg/ally/container/_impl/_support.py", line 101, in followWiring
        (wentity.name, locationStack(value.__class__)))
    ally.container.error.SetupError: Cannot solve wiring 'articleService' at: 
      File "/var/opt/ally-py/superdesk/distribution/plugins/content_article-1.0.dev-py3.2.egg/content/article/impl/article_file.py", line 24
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    ================================================== Application started in 19.26 seconds
  • seems like missing mongodb (port 27017). can u install it?
  • You don't need mongoDb for common LiveBlog functionality.
    Just disable the content related plugins as specified on install file (see below):

    # The prefix for the plugins to be excluded, something like: gui-action, introspection-request.
    excluded_plugins:
    - content_article
    - content_packager
    - content_publisher
  • Oh ok. I'd only been working with each step by step. Didn't contemplate a step ahead would cause an issue here.

    So just to be clear when removing the "[ ]" in 
    /var/opt/ally-py/superdesk/distribution/application.properties
    I replace it with the excludes you provided so it looks precisely as you say.

    I appreciate my netbook must run slow and the first run seems to take about 10 minutes. BUT the web interface has at last shown and I am able to log in!! Yay, Wahoo etc.

    Terminal still shows a couple of errors:
    ERROR    plugins/livedesk_embed-1.0.dev-py3.2.egg/gui-resources/scripts/js/core/utils/extend.js: 'utf-8' codec can't decode byte 0xa9 in position 1221: invalid start byte internationalization.scanner
    INFO     Published themes 'lib/livedesk-embed'                                                                __plugin__.livedesk_embed.theme_default
    ERROR    Unable to deploy GraphicsMagic on all 7.4!
        You must install it manually and set the proper path in the plugins.properties
        file for the property gm_path (e.g. /usr/bin/gm). __plugin__.binary_gm

  • First time the server is started the js code is parsed in order to extract localization strings.
    When you start second time it will start in a few seconds.

    Try to upload an image on media archive and if it is not working please install gm and set the path on plugins.properties file as it is explained on error message.
  • Just in case anyone comes at a later point with the same issue as I here's a link explaining the installation and path settings needed for GraphicsMagick (Note the 'K' at the end unlike the error message)


    So I hope I did that. Could only find the 'gm_path' mentioned the once at line 414:
    thumbnailProcessor.ThumbnailProcessorGM.gm_path:

    Do any of the other gm paths need fixing too?? Specifically line 20:
    gm_dir_path: workspace/tools/gm

    Anyway I changed that too for now as I had the following error and wanted to see if the gm_dir_path changed too would get rid of it. 

    File "/usr/lib/python3.2/subprocess.py", line 1371, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    OSError: [Errno 2] No such file or directory: 'workspace/tools/exiv2/bin/exiv2.exe'

    Maybe this issue surrounding 32 bit Linux??
    Post edited by David Ross at 2014-04-11 11:30:07
  • Here are details how to set the paths for the tools that are used for media processing:

    http://forum.sourcefabric.org/discussion/16250/media-uploading-and-image-uploading-not-working
  • Thank you very much Ioan.

    Again in case anyone else comes in after me with same issues:
    1) the plugins.properties file needs editing again in sudo.. ( in crunchbang I had to type gksudo geany /var/opt/ally-py/superdesk/distribution/plugins.properties )
    2) for the plugins, namely gm/ffmpeg (for audio and video as well as the temp folder)/exiv2 you need to type the correct path to the executable in eg. "/usr/bin/exiv2" (without the quotes). They seem to essentially be anything with the path "workspace"
    3) you may need to install the packages from these if you can not locate them in /usr/bin (I did so via synaptic)

    The one I currently can't locate:
    # The path where ffmpeg writes temp data 
    audioDataHandler.ffmpeg_tmp_path: workspace/tools/ffmpeg/tmp

     
  • # The path where ffmpeg writes temp data
    audioDataHandler.ffmpeg_tmp_path: workspace/tools/ffmpeg/tmp

    This is just a temporary path to save partial processed files, so there is not needed to change it.
    However the application should have the read&write rights in workspace directory.
    Post edited by Ioan Pocol at 2014-04-15 08:32:23