question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python 3 raises a NameError because of file builtin

See original GitHub issue

Hello, I am using pydot2==1.0.33 with Python 3.4. It seems that the pydot.Dot.write_png does not work with Python 3 because of the file builtin, removed in Python 3, causing a NameError.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
johnyfcommented, Jun 10, 2016
  • I plan to release 1.2.0 by June 30.
  • I think that the best approach to get a working parser in Python 3.4 for now is to install either from the branch nlhelper_master here, or the fork’s repository, or pip install pydotplus.
  • Thanks for offering to help, I will come back to this with specific action items.
1reaction
alexprengerecommented, Feb 1, 2016

Ok thanks I will test your repository. Out of curiosity, why not fixing this repository instead of creating another package? Indeed it seems no commits have been done since 2012, pull requests and issues do not seem to get much attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Built-in Exceptions — Python 3.11.1 documentation
Setting __cause__ also implicitly sets the __suppress_context__ attribute to True , so that using raise new_exc from None effectively replaces the old exception ......
Read more >
Handling NameError Exception in Python - GeeksforGeeks
General causes for NameError being raised are : 1. Misspelled built-in functions: In the below example code, the print statement is misspelled ...
Read more >
python NameError: name 'file' is not defined - Stack Overflow
It seems that your project is written in Python < 3. This is because the file() builtin function is removed in Python 3....
Read more >
How NameError Works in Python with Examples - eduCBA
NameError is a kind of error in python that occurs when executing a function, variable, library or string without quotes that have been...
Read more >
Error Types in Python - TutorialsTeacher
In Python 3.x, print is a built-in function and requires parentheses. The statement above violates this usage and hence syntax error is displayed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found