# Cant download .py file

**URL:** <https://forum.getkirby.com/t/cant-download-py-file/6567>\
**Category:** Questions\
**Tags:** v2\
**Created:** [February 8, 2017, 3:54am UTC](https://forum.getkirby.com/t/cant-download-py-file/6567 "2017-02-08T03:54:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guidoferreyra](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/guidoferreyra/32/12544_2.png) [@guidoferreyra](https://forum.getkirby.com/u/guidoferreyra)\
**Post date:** [February 8, 2017, 3:54am UTC](https://forum.getkirby.com/t/cant-download-py-file/6567/1 "2017-02-08T03:54:04Z")

</div>

Hi everyone I want to use the tag (file:) to give users access to some .py (Python) files, but when I click on the generated link it leads me to an error page. While I’m in localhost everything works fine but in the server no.

Any help? Thanks in advance

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 8, 2017, 9:17am UTC](https://forum.getkirby.com/t/cant-download-py-file/6567/2 "2017-02-08T09:17:25Z")

</div>

How about zipping the file before download?

An alternative could be to disable default handling of such files via .htaccess, provided that you don’t need to execute python scripts within your project folder:

```auto
RemoveHandler cgi-script .py

```

---

<div class="post-metadata">

**Author:** ![guidoferreyra](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/guidoferreyra/32/12544_2.png) [@guidoferreyra](https://forum.getkirby.com/u/guidoferreyra)\
**Post date:** [February 8, 2017, 5:38pm UTC](https://forum.getkirby.com/t/cant-download-py-file/6567/3 "2017-02-08T17:38:57Z")

</div>

Thank you! the httaccess trick is what I needed!

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:52pm UTC](https://forum.getkirby.com/t/cant-download-py-file/6567/4 "2025-02-06T16:52:48Z")

</div>


