os.path AttributeError: 'str' object has no attribute 'exists'How do I check whether a file exists without exceptions?How to sort a list of objects based on an attribute of the objects?How to know if an object has an attribute in PythonCheck if a given key already exists in a dictionaryDetermine the type of an object?AttributeError: 'module' object has no attribute 'urlopen'How to find if directory exists in PythonAttributeError: 'str' object has no attribute 'write'AttributeError: 'str' object has no attribute 'set' in tkinterGetting a TypeError: expected str, bytes or os.PathLike object, not InMemoryUploadedFile

Strong empirical falsification of quantum mechanics based on vacuum energy density

Mixing PEX brands

Can a Canadian Travel to the USA twice, less than 180 days each time?

What is Cash Advance APR?

Open a doc from terminal, but not by its name

Can the US President recognize Israel’s sovereignty over the Golan Heights for the USA or does that need an act of Congress?

How to fade a semiplane defined by line?

Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset

What is the highest possible scrabble score for placing a single tile

Why Shazam when there is already Superman?

What are the advantages of simplicial model categories over non-simplicial ones?

Keeping a ball lost forever

putting logo on same line but after title, latex

Using substitution ciphers to generate new alphabets in a novel

Is aluminum electrical wire used on aircraft?

Biological Blimps: Propulsion

How can I write humor as character trait?

Limits and Infinite Integration by Parts

What should you do if you miss a job interview (deliberately)?

15% tax on $7.5k earnings. Is that right?

How to cover method return statement in Apex Class?

Can I visit Japan without a visa?

On a tidally locked planet, would time be quantized?

Fear of getting stuck on one programming language / technology that is not used in my country



os.path AttributeError: 'str' object has no attribute 'exists'


How do I check whether a file exists without exceptions?How to sort a list of objects based on an attribute of the objects?How to know if an object has an attribute in PythonCheck if a given key already exists in a dictionaryDetermine the type of an object?AttributeError: 'module' object has no attribute 'urlopen'How to find if directory exists in PythonAttributeError: 'str' object has no attribute 'write'AttributeError: 'str' object has no attribute 'set' in tkinterGetting a TypeError: expected str, bytes or os.PathLike object, not InMemoryUploadedFile













0















I'm trying to reproduce the code from this site: https://www.guru99.com/python-copy-file.html



The general idea is to copy a file using python. Although I can work my way around the errors, I also want to understand what I'm doing wrong in this case.



import shutil
from os import path
def main(filename):
if path.exists(filename):
src = path.realpath(filename)
head, tail = path.split(src)
dst = src + ".bak"
shutil.copy(src,dst)

main('C:\Users\test.txt') #This raises the error
main('test.txt') #This works, if the file is in the same folder as the py script


If used with the full directory (main('C:Userstest.txt')) The code returns the error AttributeError: 'str' object has no attribute 'exists'. If I remove the line with path.exists() I get a similar error: AttributeError: 'str' object has no attribute 'realpath'.
By using the filename main('test.txt') everything works, as long as the file is in the same folder as the python script that contains the function.



So I tried reading the docs, which states for both path.exists() and path.realpath():




Changed in version 3.6: Accepts a path-like object.




Since I'm running 3.7.1 I went foward to check what is a "path-like object":




An object representing a file system path. A path-like object is either a str or bytes object representing a path, or an object implementing the os.PathLike protocol. An object that supports the os.PathLike protocol can be converted to a str or bytes file system path by calling the os.fspath() function; os.fsdecode() and os.fsencode() can be used to guarantee a str or bytes result instead, respectively. Introduced by PEP 519.




From that, given that I provided a string, I take it should be working. So what I'm missing?










share|improve this question

















  • 3





    That doesn't sound like it has anything to do with what string you're passing in. That sounds like you named the argument path in one version of your code and completely forgot about it.

    – user2357112
    Mar 8 at 2:19






  • 1





    @user2357112 Agreed. Since the code here is fine, voting to close as a problem that can't be reproduced.

    – Joseph Sible
    Mar 8 at 2:20











  • Try print(type(path)) just ahead of the first use. I expect that will produce str rather than a path object. If so, you need to trace the definition of path back to its source. Your posted code does not show this problem.

    – Prune
    Mar 8 at 2:29















0















I'm trying to reproduce the code from this site: https://www.guru99.com/python-copy-file.html



The general idea is to copy a file using python. Although I can work my way around the errors, I also want to understand what I'm doing wrong in this case.



import shutil
from os import path
def main(filename):
if path.exists(filename):
src = path.realpath(filename)
head, tail = path.split(src)
dst = src + ".bak"
shutil.copy(src,dst)

main('C:\Users\test.txt') #This raises the error
main('test.txt') #This works, if the file is in the same folder as the py script


If used with the full directory (main('C:Userstest.txt')) The code returns the error AttributeError: 'str' object has no attribute 'exists'. If I remove the line with path.exists() I get a similar error: AttributeError: 'str' object has no attribute 'realpath'.
By using the filename main('test.txt') everything works, as long as the file is in the same folder as the python script that contains the function.



So I tried reading the docs, which states for both path.exists() and path.realpath():




Changed in version 3.6: Accepts a path-like object.




Since I'm running 3.7.1 I went foward to check what is a "path-like object":




An object representing a file system path. A path-like object is either a str or bytes object representing a path, or an object implementing the os.PathLike protocol. An object that supports the os.PathLike protocol can be converted to a str or bytes file system path by calling the os.fspath() function; os.fsdecode() and os.fsencode() can be used to guarantee a str or bytes result instead, respectively. Introduced by PEP 519.




From that, given that I provided a string, I take it should be working. So what I'm missing?










share|improve this question

















  • 3





    That doesn't sound like it has anything to do with what string you're passing in. That sounds like you named the argument path in one version of your code and completely forgot about it.

    – user2357112
    Mar 8 at 2:19






  • 1





    @user2357112 Agreed. Since the code here is fine, voting to close as a problem that can't be reproduced.

    – Joseph Sible
    Mar 8 at 2:20











  • Try print(type(path)) just ahead of the first use. I expect that will produce str rather than a path object. If so, you need to trace the definition of path back to its source. Your posted code does not show this problem.

    – Prune
    Mar 8 at 2:29













0












0








0








I'm trying to reproduce the code from this site: https://www.guru99.com/python-copy-file.html



The general idea is to copy a file using python. Although I can work my way around the errors, I also want to understand what I'm doing wrong in this case.



import shutil
from os import path
def main(filename):
if path.exists(filename):
src = path.realpath(filename)
head, tail = path.split(src)
dst = src + ".bak"
shutil.copy(src,dst)

main('C:\Users\test.txt') #This raises the error
main('test.txt') #This works, if the file is in the same folder as the py script


If used with the full directory (main('C:Userstest.txt')) The code returns the error AttributeError: 'str' object has no attribute 'exists'. If I remove the line with path.exists() I get a similar error: AttributeError: 'str' object has no attribute 'realpath'.
By using the filename main('test.txt') everything works, as long as the file is in the same folder as the python script that contains the function.



So I tried reading the docs, which states for both path.exists() and path.realpath():




Changed in version 3.6: Accepts a path-like object.




Since I'm running 3.7.1 I went foward to check what is a "path-like object":




An object representing a file system path. A path-like object is either a str or bytes object representing a path, or an object implementing the os.PathLike protocol. An object that supports the os.PathLike protocol can be converted to a str or bytes file system path by calling the os.fspath() function; os.fsdecode() and os.fsencode() can be used to guarantee a str or bytes result instead, respectively. Introduced by PEP 519.




From that, given that I provided a string, I take it should be working. So what I'm missing?










share|improve this question














I'm trying to reproduce the code from this site: https://www.guru99.com/python-copy-file.html



The general idea is to copy a file using python. Although I can work my way around the errors, I also want to understand what I'm doing wrong in this case.



import shutil
from os import path
def main(filename):
if path.exists(filename):
src = path.realpath(filename)
head, tail = path.split(src)
dst = src + ".bak"
shutil.copy(src,dst)

main('C:\Users\test.txt') #This raises the error
main('test.txt') #This works, if the file is in the same folder as the py script


If used with the full directory (main('C:Userstest.txt')) The code returns the error AttributeError: 'str' object has no attribute 'exists'. If I remove the line with path.exists() I get a similar error: AttributeError: 'str' object has no attribute 'realpath'.
By using the filename main('test.txt') everything works, as long as the file is in the same folder as the python script that contains the function.



So I tried reading the docs, which states for both path.exists() and path.realpath():




Changed in version 3.6: Accepts a path-like object.




Since I'm running 3.7.1 I went foward to check what is a "path-like object":




An object representing a file system path. A path-like object is either a str or bytes object representing a path, or an object implementing the os.PathLike protocol. An object that supports the os.PathLike protocol can be converted to a str or bytes file system path by calling the os.fspath() function; os.fsdecode() and os.fsencode() can be used to guarantee a str or bytes result instead, respectively. Introduced by PEP 519.




From that, given that I provided a string, I take it should be working. So what I'm missing?







python






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 2:17









ZeCariocaZeCarioca

195




195







  • 3





    That doesn't sound like it has anything to do with what string you're passing in. That sounds like you named the argument path in one version of your code and completely forgot about it.

    – user2357112
    Mar 8 at 2:19






  • 1





    @user2357112 Agreed. Since the code here is fine, voting to close as a problem that can't be reproduced.

    – Joseph Sible
    Mar 8 at 2:20











  • Try print(type(path)) just ahead of the first use. I expect that will produce str rather than a path object. If so, you need to trace the definition of path back to its source. Your posted code does not show this problem.

    – Prune
    Mar 8 at 2:29












  • 3





    That doesn't sound like it has anything to do with what string you're passing in. That sounds like you named the argument path in one version of your code and completely forgot about it.

    – user2357112
    Mar 8 at 2:19






  • 1





    @user2357112 Agreed. Since the code here is fine, voting to close as a problem that can't be reproduced.

    – Joseph Sible
    Mar 8 at 2:20











  • Try print(type(path)) just ahead of the first use. I expect that will produce str rather than a path object. If so, you need to trace the definition of path back to its source. Your posted code does not show this problem.

    – Prune
    Mar 8 at 2:29







3




3





That doesn't sound like it has anything to do with what string you're passing in. That sounds like you named the argument path in one version of your code and completely forgot about it.

– user2357112
Mar 8 at 2:19





That doesn't sound like it has anything to do with what string you're passing in. That sounds like you named the argument path in one version of your code and completely forgot about it.

– user2357112
Mar 8 at 2:19




1




1





@user2357112 Agreed. Since the code here is fine, voting to close as a problem that can't be reproduced.

– Joseph Sible
Mar 8 at 2:20





@user2357112 Agreed. Since the code here is fine, voting to close as a problem that can't be reproduced.

– Joseph Sible
Mar 8 at 2:20













Try print(type(path)) just ahead of the first use. I expect that will produce str rather than a path object. If so, you need to trace the definition of path back to its source. Your posted code does not show this problem.

– Prune
Mar 8 at 2:29





Try print(type(path)) just ahead of the first use. I expect that will produce str rather than a path object. If so, you need to trace the definition of path back to its source. Your posted code does not show this problem.

– Prune
Mar 8 at 2:29












2 Answers
2






active

oldest

votes


















1














Your code:



import shutil
from os import path
def main(filename):
if path.exists(filename):
src = path.realpath(filename)
head, tail = path.split(src)
dst = src + ".bak"
shutil.copy(src,dst)

main('C:\Users\test.txt') #This raises the error
main('test.txt') #This works, if the file is in the same folder as the py script


It works fine, but if you re-define a local variable named path, like this:



import shutil
from os import path


def main(filename):
if path.exists(filename):
src = path.realpath(filename)
head, tail = path.split(src)
dst = src + ".bak"
shutil.copy(src, dst)

# The path variable here overrides the path in the main function.
path = 'abc'

main('C:\Users\test.txt') # This raises the error


This is just your code I guess, obviously this is a wrong example.



I would recommend using the os.path after import os, because the path variable name is very common, it is easy to conflict.



For a good example:



import shutil
import os


def main(filename):
if os.path.exists(filename):
src = os.path.realpath(filename)
head, tail = os.path.split(src)
dst = src + ".bak"
shutil.copy(src, dst)

main('C:\Users\test.txt')
main('test.txt')





share|improve this answer

























  • is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

    – Corey Goldberg
    Mar 8 at 3:25











  • @Corey Goldberg I am showing the cause of the problem.

    – DDGG
    Mar 8 at 3:49











  • then your answer is very unclear

    – Corey Goldberg
    Mar 8 at 3:57











  • @Corey Goldberg Ok, I edited my answer.

    – DDGG
    Mar 8 at 6:02


















1














Type on shell



Type(path)


And check result and value, maybe you redefine this import to a variable str.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055792%2fos-path-attributeerror-str-object-has-no-attribute-exists%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Your code:



    import shutil
    from os import path
    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src,dst)

    main('C:\Users\test.txt') #This raises the error
    main('test.txt') #This works, if the file is in the same folder as the py script


    It works fine, but if you re-define a local variable named path, like this:



    import shutil
    from os import path


    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    # The path variable here overrides the path in the main function.
    path = 'abc'

    main('C:\Users\test.txt') # This raises the error


    This is just your code I guess, obviously this is a wrong example.



    I would recommend using the os.path after import os, because the path variable name is very common, it is easy to conflict.



    For a good example:



    import shutil
    import os


    def main(filename):
    if os.path.exists(filename):
    src = os.path.realpath(filename)
    head, tail = os.path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    main('C:\Users\test.txt')
    main('test.txt')





    share|improve this answer

























    • is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

      – Corey Goldberg
      Mar 8 at 3:25











    • @Corey Goldberg I am showing the cause of the problem.

      – DDGG
      Mar 8 at 3:49











    • then your answer is very unclear

      – Corey Goldberg
      Mar 8 at 3:57











    • @Corey Goldberg Ok, I edited my answer.

      – DDGG
      Mar 8 at 6:02















    1














    Your code:



    import shutil
    from os import path
    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src,dst)

    main('C:\Users\test.txt') #This raises the error
    main('test.txt') #This works, if the file is in the same folder as the py script


    It works fine, but if you re-define a local variable named path, like this:



    import shutil
    from os import path


    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    # The path variable here overrides the path in the main function.
    path = 'abc'

    main('C:\Users\test.txt') # This raises the error


    This is just your code I guess, obviously this is a wrong example.



    I would recommend using the os.path after import os, because the path variable name is very common, it is easy to conflict.



    For a good example:



    import shutil
    import os


    def main(filename):
    if os.path.exists(filename):
    src = os.path.realpath(filename)
    head, tail = os.path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    main('C:\Users\test.txt')
    main('test.txt')





    share|improve this answer

























    • is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

      – Corey Goldberg
      Mar 8 at 3:25











    • @Corey Goldberg I am showing the cause of the problem.

      – DDGG
      Mar 8 at 3:49











    • then your answer is very unclear

      – Corey Goldberg
      Mar 8 at 3:57











    • @Corey Goldberg Ok, I edited my answer.

      – DDGG
      Mar 8 at 6:02













    1












    1








    1







    Your code:



    import shutil
    from os import path
    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src,dst)

    main('C:\Users\test.txt') #This raises the error
    main('test.txt') #This works, if the file is in the same folder as the py script


    It works fine, but if you re-define a local variable named path, like this:



    import shutil
    from os import path


    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    # The path variable here overrides the path in the main function.
    path = 'abc'

    main('C:\Users\test.txt') # This raises the error


    This is just your code I guess, obviously this is a wrong example.



    I would recommend using the os.path after import os, because the path variable name is very common, it is easy to conflict.



    For a good example:



    import shutil
    import os


    def main(filename):
    if os.path.exists(filename):
    src = os.path.realpath(filename)
    head, tail = os.path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    main('C:\Users\test.txt')
    main('test.txt')





    share|improve this answer















    Your code:



    import shutil
    from os import path
    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src,dst)

    main('C:\Users\test.txt') #This raises the error
    main('test.txt') #This works, if the file is in the same folder as the py script


    It works fine, but if you re-define a local variable named path, like this:



    import shutil
    from os import path


    def main(filename):
    if path.exists(filename):
    src = path.realpath(filename)
    head, tail = path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    # The path variable here overrides the path in the main function.
    path = 'abc'

    main('C:\Users\test.txt') # This raises the error


    This is just your code I guess, obviously this is a wrong example.



    I would recommend using the os.path after import os, because the path variable name is very common, it is easy to conflict.



    For a good example:



    import shutil
    import os


    def main(filename):
    if os.path.exists(filename):
    src = os.path.realpath(filename)
    head, tail = os.path.split(src)
    dst = src + ".bak"
    shutil.copy(src, dst)

    main('C:\Users\test.txt')
    main('test.txt')






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 8 at 6:02

























    answered Mar 8 at 2:31









    DDGGDDGG

    406213




    406213












    • is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

      – Corey Goldberg
      Mar 8 at 3:25











    • @Corey Goldberg I am showing the cause of the problem.

      – DDGG
      Mar 8 at 3:49











    • then your answer is very unclear

      – Corey Goldberg
      Mar 8 at 3:57











    • @Corey Goldberg Ok, I edited my answer.

      – DDGG
      Mar 8 at 6:02

















    • is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

      – Corey Goldberg
      Mar 8 at 3:25











    • @Corey Goldberg I am showing the cause of the problem.

      – DDGG
      Mar 8 at 3:49











    • then your answer is very unclear

      – Corey Goldberg
      Mar 8 at 3:57











    • @Corey Goldberg Ok, I edited my answer.

      – DDGG
      Mar 8 at 6:02
















    is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

    – Corey Goldberg
    Mar 8 at 3:25





    is this an answer or are you showing what not to do? because shadowing a name you just imported is a horrible idea.

    – Corey Goldberg
    Mar 8 at 3:25













    @Corey Goldberg I am showing the cause of the problem.

    – DDGG
    Mar 8 at 3:49





    @Corey Goldberg I am showing the cause of the problem.

    – DDGG
    Mar 8 at 3:49













    then your answer is very unclear

    – Corey Goldberg
    Mar 8 at 3:57





    then your answer is very unclear

    – Corey Goldberg
    Mar 8 at 3:57













    @Corey Goldberg Ok, I edited my answer.

    – DDGG
    Mar 8 at 6:02





    @Corey Goldberg Ok, I edited my answer.

    – DDGG
    Mar 8 at 6:02













    1














    Type on shell



    Type(path)


    And check result and value, maybe you redefine this import to a variable str.






    share|improve this answer



























      1














      Type on shell



      Type(path)


      And check result and value, maybe you redefine this import to a variable str.






      share|improve this answer

























        1












        1








        1







        Type on shell



        Type(path)


        And check result and value, maybe you redefine this import to a variable str.






        share|improve this answer













        Type on shell



        Type(path)


        And check result and value, maybe you redefine this import to a variable str.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 at 2:39









        Leonardo Ramos DuarteLeonardo Ramos Duarte

        220310




        220310



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055792%2fos-path-attributeerror-str-object-has-no-attribute-exists%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

            Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

            2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived