Plz help

I am new to python

On Sat, Sep 14, 2024, 13:22 RANGA BHARATH JINKA <[email protected]>
wrote:

> If you integrate sentry for capturing error logs , then check there
>
> On Sat, 14 Sept, 2024, 8:02 am Tarun Sharma, <[email protected]> wrote:
>
>> Hello Ranga
>>
>> Thanks for the reply, I already tried these same steps which you
>> mentioned, But still facing the same issue. My main concern is when i'm
>> trying to run the project on an 8080 or 8000 port then it's working fine.
>> But when i'm trying to run this project through apache then it's giving
>> the DLL load failed while importing _rust: The specified module could
>> not be found.
>>
>> When I tried to remove the code from views.py then the site is working
>> fine on domain or 80 number port that means there is no issue with
>> environment variables and apache or xampp.
>> If we tried to run on a python manage.py runserver 127.0.0.1:8080 or
>> 8000 port then the cryptography module is working fine that means there is
>> no cryptography version issue. It's a really weird thing. Please let me
>> know if you have any other solution.
>>
>> Thanks
>> Tarun
>>
>>
>>
>>
>>
>>
>> On Fri, 13 Sept 2024 at 12:54, RANGA BHARATH JINKA <
>> [email protected]> wrote:
>>
>>> The error you're encountering, *"DLL load failed while importing _rust:
>>> The specified module could not be found"*, typically indicates a
>>> compatibility issue between your Python environment and the cryptography
>>> library (or one of its dependencies) used by the Snowflake connector.
>>>
>>> Here's how you can troubleshoot and resolve the issue:
>>>
>>> ### 1. **Check Cryptography and Dependencies Installation**
>>>    - The cryptography package used by Snowflake requires Rust to compile
>>> certain dependencies, especially for Windows.
>>>    - Ensure you have installed the required dependencies with Rust
>>> correctly by following these steps:
>>>      - Open your terminal or command prompt.
>>>      - Run the following command to install the Rust toolchain:
>>>        ```bash
>>>        pip install cryptography
>>>        ```
>>>      - Alternatively, you can try installing it with Rust support
>>> enabled:
>>>        ```bash
>>>        pip install cryptography --use-pep517
>>>        ```
>>>
>>> ### 2. **Check Compatibility with Windows**
>>>    - Since you are on Windows Server 2019, ensure that the Snowflake
>>> connector and its dependencies (like cryptography) are compatible with the
>>> Python version and Windows Server.
>>>    - It might help to uninstall cryptography and reinstall it
>>> specifically with the correct version that supports your environment:
>>>      ```bash
>>>      pip uninstall cryptography
>>>      pip install cryptography==36.0.0  # or the latest version
>>> supporting your setup
>>>      ```
>>>
>>> ### 3. **Reinstall Snowflake Connector**
>>>    - Uninstall and reinstall the Snowflake connector in case of a
>>> corrupt or incomplete installation:
>>>      ```bash
>>>      pip uninstall snowflake-connector-python
>>>      pip install snowflake-connector-python
>>>      ```
>>>
>>> ### 4. **Check Apache Configuration (For Production Use)**
>>>    - You mentioned it's working with `python manage.py runserver` but
>>> fails when running on port 80 or domain with Apache.
>>>    - Ensure that Apache has permission to access all necessary Python
>>> packages and environment variables.
>>>    - Verify that the virtual environment (if using one) is activated
>>> when running the application via Apache.
>>>    - You can configure this in the `wsgi.py` file or your Apache config,
>>> ensuring the correct Python environment is being used.
>>>
>>> ### 5. **DLL Dependencies**
>>>    - If you're still facing issues, you might be missing some DLLs.
>>> Install the [Microsoft Visual C++ Redistributable](
>>> https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170),
>>> which is sometimes needed for some Python libraries to run on Windows.
>>>
>>> After following these steps, try running the project again on the
>>> desired port or domain.
>>>
>>> All the best 👍
>>>
>>> On Fri, Sep 13, 2024 at 8:06 PM Tarun Sharma <[email protected]> wrote:
>>>
>>>> Hi
>>>>
>>>> I'm trying to use the snowflake connector and i've installed the all
>>>> cryptography dependencies with latest versions. When i'm trying to run the
>>>> project python manage.py run server then it's working fine. When i tried to
>>>> run on 80 number port or domain then it' showing me this error
>>>>
>>>> DLL load failed while importing _rust: The specified module could not
>>>> be found.
>>>> Here is my OS environment.
>>>> 1. Windows server 2019
>>>> 2. Django working with xampp (apache2)
>>>>
>>>> Please let me know if anyone can help me.
>>>>
>>>> Thanks
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/9afe5895-a74c-492a-b03e-6dd15b11f80dn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/9afe5895-a74c-492a-b03e-6dd15b11f80dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> Thanks and Regards
>>>
>>> J. Ranga Bharath
>>> cell: 9110334114
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAK5m31535uXWNxzLccJ5jQTFsVN%3DxdCynqHesTcf49imvRSEhw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAK5m31535uXWNxzLccJ5jQTFsVN%3DxdCynqHesTcf49imvRSEhw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAGioy6wYKKjW7gLHgnJmeQb%2B-cOiZ79n_NKr_OmRFC31rvP-XA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAGioy6wYKKjW7gLHgnJmeQb%2B-cOiZ79n_NKr_OmRFC31rvP-XA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK5m317MyS4yEfAoy-KOKB6WdjTC6qbFMPyqcupnK%2BWkAKi2cg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK5m317MyS4yEfAoy-KOKB6WdjTC6qbFMPyqcupnK%2BWkAKi2cg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANGWp6wBbmQUH0%3D9CcvaS3Q7sL9%2BLMSFvGEmSi1q2QSBTMp3vw%40mail.gmail.com.

Reply via email to