Coder Social home page Coder Social logo

Comments (5)

nedwards-loop avatar nedwards-loop commented on August 28, 2024

`\AppData\Local\Continuum\anaconda3\lib\site-packages\aanalytics2\aanalytics2.py in findComponentsUsage(self, components, projectDetails, segments, calculatedMetrics, recursive, regexUsed, verbose, resetProjectDetails, rsidSuffix)
1512 else:
1513 raise Exception("Project details were not able to be processed")
-> 1514 teeProjects:tuple = tee(myProjectDetails) ## duplicating the project generator for recursive pass (low memory - intensive computation)
1515 returnObj = {element : {'segments':[],'calculatedMetrics':[],'projects':[]} for element in components}
1516 recurseObj = defaultdict(list)

UnboundLocalError: local variable 'myProjectDetails' referenced before assignment
`

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on August 28, 2024

Hello Nick
Thanks for raising the issue, I believe I need to be more descriptive in my docstring.
The projectDetails argument takes a list... of Project detail instances.

You would need to do a 3 steps process to make it run as you want to I believe.
I assume you want to run the search on a selected amount of project.

  1. Retrieve all projects, with the getProjects method
  2. Get all project details with the method getAllProjectDetails, there you can pass the list or pandas dataframe with the sublist that you want.
  3. pass the returned element to the findComponentsUsage on the projectDetails argument.

I hope that helps.

from adobe-analytics-api-2.0.

nedwards-loop avatar nedwards-loop commented on August 28, 2024

Thanks for getting back to me. I was passing through a list of project id's like this:
['56de8e0ebdf14b6045fdc5e9'].

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on August 28, 2024

That is what I thought.
To filter the projects, you need to filter then on the step 2 that I proposed earlier.
Directly in the dataframe resulting from the getProjects method.
Then you can pass that filtered list to the getAllProjectDetails and you can use that result in the findComponentUsage with the projectDetails argument.

projectDetails doesn't take only list of project IDs for the moment, I would need to internalize everything I explained above to do that.

I will try to edit the docstring to explain that better.

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on August 28, 2024

I am closing the ticket as I improved the documentation on the last release.

from adobe-analytics-api-2.0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.