Ask coding questions

← Back to all posts
Edit a .py file inside of a package
NicoCaldo (0)

I have a package on my app that has a bug. To fix it I just need to edit a .py file inside the package as the developer of the package seems not to be interested to fix it and update the pip version

Is there a way to do it?

Comments
hotnewtop
MrVoo (90)

You can't do that, but maybe you could do a workaround. What's the module and function?

MrVoo (90)

@NicoCaldo You COULD copy paste the code and put it in your repl, but theres probably some license that wouldn't allow it. Where is the error?

SixBeeps (5334)

@MrVoo

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

Seems like that'd be fine as long as the license is kept.

NicoCaldo (0)

@SixBeeps @MrVoo sorry guys the link to the package was wrong
I need this https://github.com/lushan88a/google_trans_new
This is the issue https://github.com/lushan88a/google_trans_new/issues/36 and as you can see it's easily fixable by editing line 233 of google_trans_new.py
from
response = (decoded_line + ']')
to
response = (decoded_line)