Badgeyay: Pdf not generated when we run main.py from directories other than app like python3 app/main.py.

Created on 19 Sep 2017  路  21Comments  路  Source: fossasia/badgeyay

I'm submitting a ...

  • [x] bug report
  • [ ] feature request

Current behavior:
workspace 1_019

Expected behavior:
File should execute no matter what our current directory is.

has-PR

All 21 comments

Please describe the bug in the issue body rather than the issue head!
kindly make the necessary changes so that it can be looked upon :)

although this is not a bug but i think we should do something about this
or atleast update README that we should go to app in order to run the file.

@gabru-md accidentally created issue without main body
Now it is updated.

@nanspro can you please explain what is the bug exactly ?
Or what steps did you carry that led to the bug ? so that we can help :D

when i am present in badgeyay folder i run python3 app/main.py
then it showed error can't open merge_badges.py no such file or directory as shown in attached picture.

the above message was sent before you posted the image. now the issue is clear.
:+1:

@gabru-md i want to work on this.
Can you tell me is this a issue for which i should change code files or just update README with running instructions mentioning especially to move to app folder before running main.py

Please have a look at the following commands

def generate_badges(_zip=False,_pdf=False):
    if _zip == True and _pdf == True:
        os.system('python merge_badges.py -z -p')
    elif _zip == True and _pdf == False:
        os.system('python merge_badges.py -z')
    else:
        os.system('python merge_badges.py -p')

These commands do require one to be in the app folder . Yes! Readme can be updated in this case.
Thanks for pointing that out. :+1:

@nanspro

  • It would be great if you could try changing the code to make it work like you said.
  • But if not then i would suggest you can change the readme.

Thanks!

Or we can find the directory in which main.py is present and then we will find merge_badges.py there instead of present directory
Anyway i would like to work on this.

ok @gabru-md i am working on this then.

@nanspro I still do not think this is a bug. If you still think you can fix this, send a PR!

ok i will try

Flask debugger is causing issues ,i am not able to resolve.
Shall i close this or let someone else try?

@jajodiaraghav @gabru-md

Can you give us the issue being caused ?

workspace 1_021

workspace 1_020

Expected output
workspace 1_022
Debugger is not becoming active i think it's inbuilt property of flask.

@gabru-md

The debugger seems to be running anyway.
But i would suggest you to propose a change in README stating that python main.py must be executed from the app folder within.
Work upon the readme @nanspro !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rupav picture rupav  路  7Comments

yashLadha picture yashLadha  路  3Comments

ParthS007 picture ParthS007  路  6Comments

niccokunzmann picture niccokunzmann  路  7Comments

mariobehling picture mariobehling  路  7Comments