GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to ingest data · Issue #46 · diffgram/python-sdk

Unable to ingest data #46

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Unable to ingest data#46
Copy link

Description

@akrogager
akrogager
opened on Sep 23, 2022
Issue body actions

I recently started using Diffgram and would like to use the SDK to automatically ingest data. However, the SDK doesn't seem to be working for me. If I run project.file.from_url(signed_url), I get the following error:

{'directory': "'directory_id' not supplied"}

I tried manually adding the directory id to the packet in the request payload as follows and then the request went through without any errors:

response = project.session.post(
    project.host + endpoint,
    json = {**packet, "directory_id": str(project.default_directory.id)})

However, I still don't see any file uploaded in the Diffgram app. Any input on how to resolve this would be greatly appreciated.

Activity

  1. akrogager
    closed this as not plannedon Sep 23, 2022
  2. akrogager commented on Sep 23, 2022

    @akrogager
    akrogager
    on Sep 23, 2022
    Author
    More actions

    The problem was that my signed_url expired too fast 🤦 But it would still be great if you could add the directory_id to the from_url method.

  3. JKYang01 commented on Aug 1, 2024

    @JKYang01
    JKYang01
    on Aug 1, 2024
    More actions

    Hi akrogager,
    Thank you very much for the information! I am also tying to ingest data using SDK and I encountered exact the same issue like yours. there ara two things I figured out:

    1. signed_url expiration: If you use AWS to generate the signed url, AWS only allow you set up time out up to 604800 seconds.
    2. the directory_id no supplied error : the function from_url() did not get the directory_id which was required in the function self.__build_packet_payload()
      my solution is add in the following code under from_url() function in diffgram/file/fileconstructor.py under line 255
    if self.client.default_directory is None:
                raise Exception("Directory not set. call set_default_directory() to set upload directory.")
            directory_id = self.client.directory_id
    

    after this modification, the pictures are uploaded successfully to the folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.