Coder Social home page Coder Social logo

Comments (9)

frederikwerner avatar frederikwerner commented on July 25, 2024 4

That helped, the error is gone! Thanks a lot!

from adobe-analytics-api-2.0.

frederikwerner avatar frederikwerner commented on July 25, 2024 1

I just tried it, but got a new error:
0.2.7-1
retrieving segments
retrieving calculated metrics
retrieving projects details - long process
1345 project details to retrieve
estimated time required : 22 minutes
search started
recursive option : True
start looking into segments
start looking into calculated metrics
start looking into projects
start looking into recursive elements
Traceback (most recent call last):
File "d:\Projects\AA_Logs\aapy.py", line 178, in
findings = mycompany.findComponentsUsage(myElements,verbose=True,recursive=True,rsidSuffix=True)
File "C:\Python\lib\site-packages\aanalytics2\aanalytics2.py", line 1679, in findComponentsUsage
for element in proj.get('segments',[]):
AttributeError: 'itertools._tee' object has no attribute 'get'

from adobe-analytics-api-2.0.

frederikwerner avatar frederikwerner commented on July 25, 2024 1

Yeah, didn't help :/

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on July 25, 2024

Thanks @frederikwerner,
From the look of your statement that you passed (thank god, you used the verbose option :) ). I can see you are trying to get the recursive version where I also look inside the segment and calculated metrics that I found during the first phase.

I tried to be smart and created a generator of your Project dictionary, it saved memory usage during the function runtime.
However, when recursive option is used, it tries to go to the projects again, but the generator is already exhausted.
I created a back up of the Projects details generator that will be used in case the recursive option is used.

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on July 25, 2024

It should be fixed in the last commit.
Could you test the last commit 2f76cb1 ?
pip install git+https://github.com/pitchmuc/adobe-analytics-api-2.0.git@2f76cb129b3e0582988a9ce9ae6b22124f9cc76f

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on July 25, 2024

I found the issue, the duplication of the generator was more complex than I thought.
Fix is uploaded with the 09c1fef commit

FYI: the recursive search is not "double recursive" (search dimension in the segment of a calculated metrics).
I am considering adding this functionality in the future now that I have the scanCalculatedMetric method but I need to see how I can handle the response in the current format.

from adobe-analytics-api-2.0.

frederikwerner avatar frederikwerner commented on July 25, 2024

Hm, still gives me an error:
0.2.7-1
retrieving segments
retrieving calculated metrics
retrieving projects details - long process
1345 project details to retrieve
estimated time required : 22 minutes
search started
recursive option : True
start looking into segments
start looking into calculated metrics
start looking into projects
start looking into recursive elements
Traceback (most recent call last):
File "d:\Projects\AA_Logs\aapy.py", line 178, in
findings = mycompany.findComponentsUsage(myElements,verbose=True,recursive=True,rsidSuffix=True)
File "C:\Python\lib\site-packages\aanalytics2\aanalytics2.py", line 1679, in findComponentsUsage
for element in proj.get('segments',[]):
AttributeError: 'itertools._tee' object has no attribute 'get'

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on July 25, 2024

what ? :(
have you re-install the library with the latest commit ?
pip install git+https://github.com/pitchmuc/adobe-analytics-api-2.0.git@09c1fefd2ebba66ce781763046e6f8773d03d1e4

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on July 25, 2024

Could you try to uninstall the aanalytics2 library and install it again with the git install ?
pip uninstall aanalytics2

I am considering that because I didn't increase the version, you do not get the last fix.

pip install git+https://github.com/pitchmuc/adobe-analytics-api-2.0.git@09c1fefd2ebba66ce781763046e6f8773d03d1e4

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.