Setting up OctoPrint on Windows

I did this and it works so far, but now i want to update my marlin version. Every tutorial i found assumes you are running octoprint on a Pi. Using the plugin Firmware Updater i need to select the path to avrdude, but it doesn't work with the directory where i installed avrdude... can anyone help?

I followed the instructions exactly, after start I get an error - octoprint.startup - crytical - Could not initialize plugin mansger: 'ascii' codec can't decode byte 0xc0 in position64: ordinal not in range(128)

Providing the octoprint.log would allow others to help you. The 0xc0 character is À for what it's worth. It's possible that this appears somewhere that's not expected, perhaps in a filename on your SD card or in your uploads to OctoPrint.

Re: [OctoPrint Community] [Get Help/Guides] Setting up OctoPrint on Windows
hi. Are we talking about the same thing? I install Octoprint on Windows and get an error after running the "octoprint serve" command. There are no octoprint.log files in any folder. All file and folder name are in English. I do not understand how the SD card relates to the process of starting an octoprint.

OutsourcedGuru Regular
January 11Providing the octoprint.log would allow others to help you. The 0xc0 character is À for what it's worth. It's possible that this appears somewhere that's not expected, perhaps in a filename on your SD card or in your uploads to OctoPrint.

Your printer's Arduino board may or may not have an SD card in it. At the beginning of connecting to your board, OctoPrint sends something like an M20 command to read the contents of that card (optionally). I'm guessing that this could be a place where the character shows up and may be confusing OctoPrint which expects a low-bit ASCII character, presumably.

Somewhere on your Windows installation of OctoPrint is the octoprint.log file. It might possibly be in C:\OctoPrint\logs or somewhere else.

Instead of a shortcut I created a .bat and .vbs-file to automatically startup in the background when computer starts. Output from the program will be stored in a textfile (OctoPrint_out.txt) and deleted every server-start. Short guide below (Replace C:\OctoPrint\ with your install location):

octoprint.bat (Place in C:\OctoPrint)
del /f "C:\OctoPrint\OctoPrint_out.txt"
start /b "" "C:\OctoPrint\venv\Scripts\octoprint.exe" serve > "C:\OctoPrint\OctoPrint_out.txt" 2>&1

octoprint.vbs (WIN+R -> shell:startup, place here for automatic startup)
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\OctoPrint\octoprint.bat" & Chr(34), 0
Set WinScriptHost = Nothing

1 Like
start /b "" "C:\OctoPrint\venv\Scripts\octoprint.exe" serve > "C:\OctoPrint\OctoPrint_out.txt" 2>&1

You might try the version I've given you. It should also direct STDERR to that same file as well. Sometimes OctoPrint logs something as ...warning('whatever') and this normally goes to STDERR instead of STDOUT, I'm guessing.

1 Like

I see, thanks for the info/heads up :slight_smile:

It would be nice if the autostart scripts in posts 88 & 89 Setting up OctoPrint on Windows would be added here at the top.
Had missed them due to all the fuss whether Win vs Linux is better or not. (I have +30yrs experience and use booth a lot depending on purpose.)
And a super great instruction! Thanks for taking the time to write it.

2 Likes

@giPeteR Good idea, I added a link.

Im getting this error while trying to update by CMD, pls help me

C:\octoPrint>pip install --upgrade https://get.octoprint.org/latest
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting https://get.octoprint.org/latest
Using cached https://get.octoprint.org/latest (5.4 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\defaul~2\appdata\local\temp\pip-req-build-gfb9zk\setup.py'"'"'; file='"'"'c:\users\defaul~2\appdata\local\temp\pip-req-build-gfb9zk\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'c:\users\defaul~2\appdata\local\temp\pip-pip-egg-info-_dd4ox'
cwd: c:\users\defaul~2\appdata\local\temp\pip-req-build-gfb9zk
Complete output (21 lines):
warning: no files found matching 'MANIFEST'
zip_safe flag not set; analyzing archive contents...

Installed c:\users\defaul~2\appdata\local\temp\pip-req-build-gfb9zk\.eggs\markdown-3.1.1-py2.7.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\defaul~2\appdata\local\temp\pip-req-build-gfb9zk\setup.py", line 294, in <module>
    setuptools.setup(**params())
  File "c:\python27\lib\distutils\core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "c:\python27\lib\site-packages\setuptools\dist.py", line 315, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "c:\python27\lib\site-packages\setuptools\dist.py", line 361, in fetch_build_eggs
    replace_conflicting=True,
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 850, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1115, in best_match
    dist = working_set.find(req)
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 719, in find
    raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (setuptools 28.8.0 (c:\python27\lib\site-packages), Requirement.parse('setuptools>=36'))
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I'm using Python 3.8 and it works like a charm.
I never installed 2.7 since it's ancient.
Apart from that I think everything was straight forward.

half a year after support end it's ancient?
Interesting time perception

1 Like

Okay, maybe ancient was a strong word and an unnecessary comment. I just wanted to say Python 3.8 works.

And I don't see how your comment helps Felipe with his 2.7 problems?
Python 2.7 was released July 3rd, 2010, i.e. 10years ago.
Wiki: In November 2014, it was announced that Python 2.7 would be supported until 2020, but users were encouraged to move to Python 3 as soon as possible.[29]
So 6years ago people were told to move on to Python 3. 6years in the SW-business is a looong time, although maybe not ancient.

Updated 2020-11-03 to use Python 3 instead of 2 for installation.

3 Likes

YawCam seems to contain a malware (see Virustotal report)...

You can use instead Web2cam, with following settings:

Stream: http://IP:PORT/camera/mjpeg
Snapshot: http://IP:PORT/camera/jpeg


An other solution is using an old Android phone as webcam, with IP webcam (play store app) and following parameters:
Stream: http://IP:PORT/video
Snapshot: http://IP:PORT/shot.jpg

could be a false positive - but having an alternative is always good :slight_smile:
thanks :octopus:

1 Like

Anyway with multiple instances, I cannot use Astroprint plugin... (it seems that this plugin is pairing only to IP adress, not IP/port...)

Someone have an idea how to pair Astroprint for multiple windows instances?

If Astroprint pairs with an IP address only, then you should not be able to run it on two separate systems on your LAN because your router/modem only has one public IP address. If this is true, then the only solution would be to get a static IP block from your ISP which could be expensive.

If you can run Astroprint on two separate systems on your LAN, then you could multi-home your Windows machine (i.e. assign it multiple IP addresses) and use a separate IP address in each instance.

Regarding build tools - maybe I'm an ignorant knucklehead, but it took me some time to realize that I had to "modify" the installation to actually select the C++ tools.
I have no idea what it installed by default, and I don't remember being asked what I want to install.
Just a FYI for others.

1 Like