dubravcik / pbixrefresher-python

Refresh Power BI reports programmatically for free
MIT License
122 stars 54 forks source link

Timeout on Step "Identifying Power BI window" #18

Open PhilippNorres opened 5 years ago

PhilippNorres commented 5 years ago

Hey,

first of all nice work searching a longer time for such a solution because we won´t use the Cloud Storage actually and using Power BI on Displays.

With the actual version we had the following issue:

C:\Users\Sadowski\AppData\Local\Programs\Python\Python37\Scripts>pbixrefresher Test.pbix --no-publish Starting Power BI Identifying Power BI window Traceback (most recent call last): File "c:\users\sadowski\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\sadowski\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Sadowski\AppData\Local\Programs\Python\Python37\Scripts\pbixrefresher.exe__main.py", line 9, in File "c:\users\sadowski\appdata\local\programs\python\python37\lib\site-packages\pbixrefresher\pbixrefresher.py", line 48, in main win.wait("enabled", timeout = 300) File "c:\users\sadowski\appdata\local\programs\python\python37\lib\site-packages\pywinauto\application.py", line 512, in wait lambda: self.check_all_conditions(check_method_names, retry_interval)) File "c:\users\sadowski\appdata\local\programs\python\python37\lib\site-packages\pywinauto\timings.py", line 375, in wait_until raise err pywinauto.timings.TimeoutError: timed out

Version of PowerBI: Version: 2.68.5432.841 64-bit (April 2019)

Can it be that MS stopped the possibility that this script can work?

greets Philipp

fast17 commented 5 years ago

I have same issue - can you help me please?

dubravcik commented 5 years ago

I just tested and it worked. You can try to execute it with longer initial wait period (use argument --init-wait 60) so the Power BI Desktop app is fully loaded and ready for commands. Hope it will help.

fast17 commented 5 years ago

First of all - thank you very much for yours time spending with my troubles: -)

and - I try to change timeout, and thi happends:

c:\Program Files (x86)\Python37-32\Scripts>pbixrefresher c:\temp\sample.pbix --init-wait 60

Starting Power BI

Traceback (most recent call last):

  File "c:\program files (x86)\python37-32\lib\runpy.py", line 193, in run module_as_main

    "main", mod_spec)

  File "c:\program files (x86)\python37-32\lib\runpy.py", line 85, in run code

    exec(code, run_globals)

  File "c:\Program Files (x86)\Python37-32\Scripts\pbixrefresher.exe_main _.py", line 9, in

  File "c:\program files (x86)\python37-32\lib\site-packages\pbixrefresher\ pbixrefresher.py", line 41, in main

    time.sleep(INIT_WAIT)

TypeError: an integer is required (got type str)

I have to confess, that I am not too "strong" i Python (I dont know anything about it) but it will be wery helpfull for me to solve this problem - so I thank you again in advance for answer...

Regards

Jiri ---------- Původní e-mail ---------- Od: Michal Dúbravčík notifications@github.com Komu: dubravcik/pbixrefresher-python <pbixrefresher-python@noreply.github. com> Datum: 25. 6. 2019 23:01:17 Předmět: Re: [dubravcik/pbixrefresher-python] Timeout on Step "Identifying Power BI window" (#18) " I just tested and it worked. You can try to execute it with longer initial wait period (use argument --init-wait 60) so the Power BI Desktop app is fully loaded and ready for commands. Hope it will help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/dubravcik/pbixrefresher-python/issues/18?email_source=notifications&email_token=AFJ7XQPCQKA4Y3PFF4OG5Y3P4KBRRA5CNFSM4HLRLLWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYRSUYY#issuecomment-505621091) , or mute the thread (https://github.com/notifications/unsubscribe-auth/AFJ7XQLKM5TRQCL7XZDT2TLP4KBRRANCNFSM4HLRLLWA) . "

dubravcik commented 5 years ago

Maku sure you have updated to the latest version on pip. Should be fixed in 0.1.8. Thanks

On 26 Jun 2019, at 23:37, fast17 notifications@github.com wrote:

First of all - thank you very much for yours time spending with my troubles: -)

and - I try to change timeout, and thi happends:

c:\Program Files (x86)\Python37-32\Scripts>pbixrefresher c:\temp\sample.pbix --init-wait 60

Starting Power BI

Traceback (most recent call last):

File "c:\program files (x86)\python37-32\lib\runpy.py", line 193, in run module_as_main

"__main__", mod_spec)

File "c:\program files (x86)\python37-32\lib\runpy.py", line 85, in run code

exec(code, run_globals)

File "c:\Program Files (x86)\Python37-32\Scripts\pbixrefresher.exe_main _.py", line 9, in

File "c:\program files (x86)\python37-32\lib\site-packages\pbixrefresher\ pbixrefresher.py", line 41, in main

time.sleep(INIT_WAIT)

TypeError: an integer is required (got type str)

I have to confess, that I am not too "strong" i Python (I dont know anything about it) but it will be wery helpfull for me to solve this problem - so I thank you again in advance for answer...

Regards

Jiri ---------- Původní e-mail ---------- Od: Michal Dúbravčík notifications@github.com Komu: dubravcik/pbixrefresher-python <pbixrefresher-python@noreply.github. com> Datum: 25. 6. 2019 23:01:17 Předmět: Re: [dubravcik/pbixrefresher-python] Timeout on Step "Identifying Power BI window" (#18) " I just tested and it worked. You can try to execute it with longer initial wait period (use argument --init-wait 60) so the Power BI Desktop app is fully loaded and ready for commands. Hope it will help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/dubravcik/pbixrefresher-python/issues/18?email_source=notifications&email_token=AFJ7XQPCQKA4Y3PFF4OG5Y3P4KBRRA5CNFSM4HLRLLWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYRSUYY#issuecomment-505621091) , or mute the thread (https://github.com/notifications/unsubscribe-auth/AFJ7XQLKM5TRQCL7XZDT2TLP4KBRRANCNFSM4HLRLLWA) . " — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jorisguichard commented 4 years ago

I have the exact same issue as described above, it just hangs at 'Identifying Power BI window'.. running Windows 10 Pro and Power BI Desktop version 2.75.5649.961 64-bit

setting the --init-wait to 60 also didn't solve this

image

jorisguichard commented 4 years ago

UPDATE: the solution for this problem seems to lie solely in the fact that you NEED to have the language in Power BI set to English (as pywinauto's commands are in English too. otherwise it won't recognise those commands..). This worked for me at least. Please confirm so this issue can be closed :)

jitendrakalyan commented 4 years ago

I have the same issue. It times out at the step "Identifying Power BI window". I am running on Windows 10 Education and PowerBI desktop ersion 2.75.5649.961 64-bit.

LevonPython commented 4 years ago

You can try this way, it is quite simple. https://github.com/LevonPython/PbiRefresher

DarknessTech commented 4 years ago

Thank you for the script! Works like a charm... but only on the validated version (2.70.5494.561). It doesn't work with the latest version of PowerBI (2.84.981.0), same issue "Timeout on Step "Identifying Power BI window" ". Most of my reports were made with newer versions and won't open on the old one. PowerBI PRO has a time limit of 2 hours when updating via gateway, some of my reports take longer than that, therefore this script is very usefull! any chance of someone fixing it?

DarknessTech commented 4 years ago

Solved the issue here's the new script: https://github.com/DarknessTech/pbixrefresher