For further actions, you may consider blocking this person and/or reporting abuse
A Workflow Copilot. Tailored to You.
Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.
Read next
![bobur profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F782740%2F3ed49cdc-6105-4914-ae4b-3425e299b3cd.jpg)
API Versioning with FastAPI and Neon Branching
Bobur Umurzokov -
![aairom profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F430591%2F85dbea8d-e5cb-47db-a4a7-ddb98f739bb5.jpeg)
Build a containerized PDF to Markdown converter using Docling and Streamlit ☁️
Alain Airom -
![ehtesham_ali_abc367f36a5b profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2447535%2Ff118933b-c885-46c9-9e07-c6da322ed602.png)
How to Earn with SaaS Using DeepSeek: Unlocking New Revenue Streams
Ehtesham Ali -
![alexander_uspenskiy_the_great profile image](https://media2.dev.to/dynamic/image/width=100,height=100,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1636857%2Fe769a564-5262-45d0-918e-c4c093972c9d.jpg)
Mistral’s ‘Small’ 24B Parameter Model Blows Minds—No Data Sent to China, Just Pure AI Power!
Alexander Uspenskiy -
Top comments (3)
Welcome to programming world, make sure that you have these correctly:
1- Spelling of the import, it should be
import random
.2- Make sure the indentation correctly done by using the tab button.
3- Make sure that your file.py should not be
random.py
this will raise some issues related to the random module.Hi Max! The suggestions provided in the other comments cover the most likely scenarios - be sure to let us know what happens! We'll be happy to jump in and help get you rolling again, if those ideas don't solve the problem - we'll just need a little more detail about what you're seeing if that's the case!
I am making a random guess here for the error as getting syntax error for an import is unusual.
Make sure you are importing random at the top of your file i.e. first line.
Second, check if you have name your .py file as random.py